AesGcm コンストラクター

定義

オーバーロード

AesGcm(Byte[])
古い.

指定されたキーを使用して、AesGcm クラスの新しいインスタンスを初期化します。

AesGcm(ReadOnlySpan<Byte>)
古い.

指定されたキーを使用して、AesGcm クラスの新しいインスタンスを初期化します。

AesGcm(Byte[], Int32)

指定されたキーと必要なタグ サイズを AesGcm 使用して、 クラスの新しいインスタンスを初期化します。

AesGcm(ReadOnlySpan<Byte>, Int32)

指定されたキーと必要なタグ サイズを AesGcm 使用して、 クラスの新しいインスタンスを初期化します。

AesGcm(Byte[])

注意事項

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

指定されたキーを使用して、AesGcm クラスの新しいインスタンスを初期化します。

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

パラメーター

key
Byte[]

このインスタンスに使用する秘密キー。

属性

例外

key パラメーターが null です。

key パラメーターの長さが 16、24、または 32 バイト (128、192、または 256 ビット) ではありません。

適用対象

AesGcm(ReadOnlySpan<Byte>)

注意事項

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

指定されたキーを使用して、AesGcm クラスの新しいインスタンスを初期化します。

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

パラメーター

key
ReadOnlySpan<Byte>

このインスタンスに使用する秘密キー。

属性

例外

key パラメーターの長さが 16、24、または 32 バイト (128、192、または 256 ビット) ではありません。

適用対象

AesGcm(Byte[], Int32)

指定されたキーと必要なタグ サイズを AesGcm 使用して、 クラスの新しいインスタンスを初期化します。

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)

パラメーター

key
Byte[]

このインスタンスに使用する秘密キー。

tagSizeInBytes
Int32

暗号化と暗号化解除で使用する必要があるタグのサイズ (バイト単位)。

例外

key パラメーターが null です。

key パラメーターの長さが 16、24、または 32 バイト (128、192、または 256 ビット) ではありません。

パラメーターは tagSizeInBytes 、 で TagByteSizes示されるサポートされていないタグ サイズです。

現在のプラットフォームでは、AES-GCM はサポートされていません。

注釈

パラメーターはtagSizeInBytes、 または DecryptEncryptタグ パラメーターが正確にこのサイズである必要があることを示すために使用されます。 必要なタグ サイズを指定すると、 の Decrypt 呼び出し元がタグを入力として指定し、その入力が予期しないサイズに切り捨てられるという問題を回避できます。

適用対象

AesGcm(ReadOnlySpan<Byte>, Int32)

指定されたキーと必要なタグ サイズを AesGcm 使用して、 クラスの新しいインスタンスを初期化します。

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)

パラメーター

key
ReadOnlySpan<Byte>

このインスタンスに使用する秘密キー。

tagSizeInBytes
Int32

暗号化と暗号化解除で使用する必要があるタグのサイズ (バイト単位)。

例外

key パラメーターの長さが 16、24、または 32 バイト (128、192、または 256 ビット) ではありません。

パラメーターは tagSizeInBytes 、 で TagByteSizes示されるサポートされていないタグ サイズです。

現在のプラットフォームでは、AES-GCM はサポートされていません。

注釈

パラメーターはtagSizeInBytes、 または DecryptEncryptタグ パラメーターが正確にこのサイズである必要があることを示すために使用されます。 必要なタグ サイズを指定すると、 の Decrypt 呼び出し元がタグを入力として指定し、その入力が予期しないサイズに切り捨てられるという問題を回避できます。

適用対象