AesGcm Konstruktory

Definicja

Przeciążenia

AesGcm(Byte[])
Przestarzałe.

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem.

AesGcm(ReadOnlySpan<Byte>)
Przestarzałe.

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem.

AesGcm(Byte[], Int32)

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem i wymaganym rozmiarem tagu.

AesGcm(ReadOnlySpan<Byte>, Int32)

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem i wymaganym rozmiarem tagu.

AesGcm(Byte[])

Źródło:
AesGcm.cs
Źródło:
AesGcm.cs
Źródło:
AesGcm.cs

Przestroga

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

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem.

public:
 AesGcm(cli::array <System::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}")]
public AesGcm (byte[] key);
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
[<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
Public Sub New (key As Byte())

Parametry

key
Byte[]

Klucz tajny do użycia dla tego wystąpienia.

Atrybuty

Wyjątki

Parametr key to null.

Długość parametru key jest inna niż 16, 24 lub 32 bajty (128, 192 lub 256 bitów).

Dotyczy

AesGcm(ReadOnlySpan<Byte>)

Źródło:
AesGcm.cs
Źródło:
AesGcm.cs
Źródło:
AesGcm.cs

Przestroga

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

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem.

public:
 AesGcm(ReadOnlySpan<System::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}")]
public AesGcm (ReadOnlySpan<byte> key);
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
[<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
Public Sub New (key As ReadOnlySpan(Of Byte))

Parametry

key
ReadOnlySpan<Byte>

Klucz tajny do użycia dla tego wystąpienia.

Atrybuty

Wyjątki

Długość parametru key jest inna niż 16, 24 lub 32 bajty (128, 192 lub 256 bitów).

Dotyczy

AesGcm(Byte[], Int32)

Źródło:
AesGcm.cs
Źródło:
AesGcm.cs

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem i wymaganym rozmiarem tagu.

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[]

Klucz tajny do użycia dla tego wystąpienia.

tagSizeInBytes
Int32

Rozmiar tagu w bajtach musi być używany przez szyfrowanie i odszyfrowywanie.

Wyjątki

Parametr key to null.

Długość parametru key jest inna niż 16, 24 lub 32 bajty (128, 192 lub 256 bitów).

Parametr tagSizeInBytes jest nieobsługiwanym rozmiarem tagu wskazywanym przez TagByteSizeselement .

Bieżąca platforma nie obsługuje usługi AES-GCM.

Uwagi

Parametr tagSizeInBytes służy do wskazywania, że parametr tagu w Encrypt elemecie lub Decrypt musi być dokładnie taki rozmiar. Wskazanie wymaganego rozmiaru tagu zapobiega problemom polegającym na tym, że osoby wywołujące Decrypt mogą podać tag jako dane wejściowe, a dane wejściowe są obcięte na nieoczekiwany rozmiar.

Dotyczy

AesGcm(ReadOnlySpan<Byte>, Int32)

Źródło:
AesGcm.cs
Źródło:
AesGcm.cs

Inicjuje AesGcm nowe wystąpienie klasy z podanym kluczem i wymaganym rozmiarem tagu.

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>

Klucz tajny do użycia dla tego wystąpienia.

tagSizeInBytes
Int32

Rozmiar tagu w bajtach musi być używany przez szyfrowanie i odszyfrowywanie.

Wyjątki

Długość parametru key jest inna niż 16, 24 lub 32 bajty (128, 192 lub 256 bitów).

Parametr tagSizeInBytes jest nieobsługiwanym rozmiarem tagu wskazywanym przez TagByteSizeselement .

Bieżąca platforma nie obsługuje usługi AES-GCM.

Uwagi

Parametr tagSizeInBytes służy do wskazywania, że parametr tagu w Encrypt elemecie lub Decrypt musi być dokładnie taki rozmiar. Wskazanie wymaganego rozmiaru tagu zapobiega problemom polegającym na tym, że osoby wywołujące Decrypt mogą podać tag jako dane wejściowe, a dane wejściowe są obcięte na nieoczekiwany rozmiar.

Dotyczy