AesGcm Konstruktor

Definisi

Overload

AesGcm(Byte[])
Kedaluwarsa.

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan.

AesGcm(ReadOnlySpan<Byte>)
Kedaluwarsa.

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan.

AesGcm(Byte[], Int32)

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan dan ukuran tag yang diperlukan.

AesGcm(ReadOnlySpan<Byte>, Int32)

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan dan ukuran tag yang diperlukan.

AesGcm(Byte[])

Sumber:
AesGcm.cs
Sumber:
AesGcm.cs
Sumber:
AesGcm.cs

Perhatian

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

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan.

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())

Parameter

key
Byte[]

Kunci rahasia yang digunakan untuk instans ini.

Atribut

Pengecualian

Parameternya key adalah null.

Panjang key parameter selain 16, 24, atau 32 byte (128, 192, atau 256 bit).

Berlaku untuk

AesGcm(ReadOnlySpan<Byte>)

Sumber:
AesGcm.cs
Sumber:
AesGcm.cs
Sumber:
AesGcm.cs

Perhatian

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

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan.

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))

Parameter

key
ReadOnlySpan<Byte>

Kunci rahasia yang digunakan untuk instans ini.

Atribut

Pengecualian

Panjang key parameter selain 16, 24, atau 32 byte (128, 192, atau 256 bit).

Berlaku untuk

AesGcm(Byte[], Int32)

Sumber:
AesGcm.cs
Sumber:
AesGcm.cs

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan dan ukuran tag yang diperlukan.

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)

Parameter

key
Byte[]

Kunci rahasia yang digunakan untuk instans ini.

tagSizeInBytes
Int32

Ukuran tag, dalam byte, yang harus digunakan oleh enkripsi dan dekripsi.

Pengecualian

Parameternya key adalah null.

Panjang key parameter selain 16, 24, atau 32 byte (128, 192, atau 256 bit).

Parameter tagSizeInBytes adalah ukuran tag yang tidak didukung yang ditunjukkan oleh TagByteSizes.

Platform saat ini tidak mendukung AES-GCM.

Keterangan

Parameter tagSizeInBytes digunakan untuk menunjukkan bahwa parameter tag di Encrypt atau Decrypt harus sama persis dengan ukuran ini. Menunjukkan ukuran tag yang diperlukan mencegah masalah di mana pemanggil Decrypt dapat menyediakan tag sebagai input dan input tersebut dipotong ke ukuran yang tidak terduga.

Berlaku untuk

AesGcm(ReadOnlySpan<Byte>, Int32)

Sumber:
AesGcm.cs
Sumber:
AesGcm.cs

Menginisialisasi instans AesGcm baru kelas dengan kunci yang disediakan dan ukuran tag yang diperlukan.

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)

Parameter

key
ReadOnlySpan<Byte>

Kunci rahasia yang digunakan untuk instans ini.

tagSizeInBytes
Int32

Ukuran tag, dalam byte, yang harus digunakan oleh enkripsi dan dekripsi.

Pengecualian

Panjang key parameter selain 16, 24, atau 32 byte (128, 192, atau 256 bit).

Parameter tagSizeInBytes adalah ukuran tag yang tidak didukung yang ditunjukkan oleh TagByteSizes.

Platform saat ini tidak mendukung AES-GCM.

Keterangan

Parameter tagSizeInBytes digunakan untuk menunjukkan bahwa parameter tag di Encrypt atau Decrypt harus sama persis dengan ukuran ini. Menunjukkan ukuran tag yang diperlukan mencegah masalah di mana pemanggil Decrypt dapat menyediakan tag sebagai input dan input tersebut dipotong ke ukuran yang tidak terduga.

Berlaku untuk