AesGcm Konstruktory

Definice

Přetížení

Name Description
AesGcm(Byte[])
Zastaralé.

Inicializuje novou instanci AesGcm třídy pomocí zadaného klíče.

AesGcm(ReadOnlySpan<Byte>)
Zastaralé.

Inicializuje novou instanci AesGcm třídy pomocí zadaného klíče.

AesGcm(Byte[], Int32)

Inicializuje novou instanci AesGcm třídy s zadaným klíčem a požadovanou velikost značky.

AesGcm(ReadOnlySpan<Byte>, Int32)

Inicializuje novou instanci AesGcm třídy s zadaným klíčem a požadovanou velikost značky.

AesGcm(Byte[])

Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs

Upozornění

AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.

Inicializuje novou instanci AesGcm třídy pomocí zadaného klíče.

public:
 AesGcm(cli::array <System::Byte> ^ key);
[System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public AesGcm(byte[] key);
public AesGcm(byte[] key);
[<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
Public Sub New (key As Byte())

Parametry

key
Byte[]

Tajný klíč, který se má použít pro tuto instanci.

Atributy

Výjimky

Parametr key je null.

Délka key parametru je jiná než 16, 24 nebo 32 bajtů (128, 192 nebo 256 bitů).

Platí pro

AesGcm(ReadOnlySpan<Byte>)

Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs

Upozornění

AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.

Inicializuje novou instanci AesGcm třídy pomocí zadaného klíče.

public:
 AesGcm(ReadOnlySpan<System::Byte> key);
[System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public AesGcm(ReadOnlySpan<byte> key);
public AesGcm(ReadOnlySpan<byte> key);
[<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
Public Sub New (key As ReadOnlySpan(Of Byte))

Parametry

key
ReadOnlySpan<Byte>

Tajný klíč, který se má použít pro tuto instanci.

Atributy

Výjimky

Délka key parametru je jiná než 16, 24 nebo 32 bajtů (128, 192 nebo 256 bitů).

Platí pro

AesGcm(Byte[], Int32)

Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs

Inicializuje novou instanci AesGcm třídy s zadaným klíčem a požadovanou velikost značky.

public:
 AesGcm(cli::array <System::Byte> ^ key, int tagSizeInBytes);
public AesGcm(byte[] key, int tagSizeInBytes);
new System.Security.Cryptography.AesGcm : byte[] * int -> System.Security.Cryptography.AesGcm
Public Sub New (key As Byte(), tagSizeInBytes As Integer)

Parametry

key
Byte[]

Tajný klíč, který se má použít pro tuto instanci.

tagSizeInBytes
Int32

Velikost značky v bajtech, kterou musí šifrování a dešifrování použít.

Výjimky

Parametr key je null.

Délka key parametru je jiná než 16, 24 nebo 32 bajtů (128, 192 nebo 256 bitů).

Parametr tagSizeInBytes je nepodporovaná velikost značky označená parametrem TagByteSizes.

Aktuální platforma nepodporuje AES-GCM.

Poznámky

Parametr tagSizeInBytes se používá k označení, že parametr značky je Encrypt nebo Decrypt musí být přesně tato velikost. Indikující požadovanou velikost značky brání problémům, kdy můžou volající Decrypt zadat značku jako vstup a tento vstup se zkrátí na neočekávanou velikost.

Platí pro

AesGcm(ReadOnlySpan<Byte>, Int32)

Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs
Zdroj:
AesGcm.cs

Inicializuje novou instanci AesGcm třídy s zadaným klíčem a požadovanou velikost značky.

public:
 AesGcm(ReadOnlySpan<System::Byte> key, int tagSizeInBytes);
public AesGcm(ReadOnlySpan<byte> key, int tagSizeInBytes);
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> * int -> System.Security.Cryptography.AesGcm
Public Sub New (key As ReadOnlySpan(Of Byte), tagSizeInBytes As Integer)

Parametry

key
ReadOnlySpan<Byte>

Tajný klíč, který se má použít pro tuto instanci.

tagSizeInBytes
Int32

Velikost značky v bajtech, kterou musí šifrování a dešifrování použít.

Výjimky

Délka key parametru je jiná než 16, 24 nebo 32 bajtů (128, 192 nebo 256 bitů).

Parametr tagSizeInBytes je nepodporovaná velikost značky označená parametrem TagByteSizes.

Aktuální platforma nepodporuje AES-GCM.

Poznámky

Parametr tagSizeInBytes se používá k označení, že parametr značky je Encrypt nebo Decrypt musí být přesně tato velikost. Indikující požadovanou velikost značky brání problémům, kdy můžou volající Decrypt zadat značku jako vstup a tento vstup se zkrátí na neočekávanou velikost.

Platí pro