AesGcm コンストラクター

定義

AesGcm クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
AesGcm(Byte[])
古い.

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

AesGcm(ReadOnlySpan<Byte>)
古い.

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

AesGcm(Byte[], Int32)

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

AesGcm(ReadOnlySpan<Byte>, Int32)

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

AesGcm(Byte[])

ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs

注意事項

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

パラメーター

key
Byte[]

このインスタンスに使用するシークレット キー。

属性

例外

key パラメーターはnull

key パラメーターの長さは、16、24、または 32 バイト (128、192、または 256 ビット) 以外です。

適用対象

AesGcm(ReadOnlySpan<Byte>)

ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs

注意事項

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

パラメーター

key
ReadOnlySpan<Byte>

このインスタンスに使用するシークレット キー。

属性

例外

key パラメーターの長さは、16、24、または 32 バイト (128、192、または 256 ビット) 以外です。

適用対象

AesGcm(Byte[], Int32)

ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs

指定されたキーと必要なタグ サイズを使用して、 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 パラメーターは、EncryptまたはDecryptのタグ パラメーターが正確にこのサイズである必要があることを示すために使用されます。 必要なタグ サイズを指定すると、 Decrypt の呼び出し元が入力としてタグを指定する可能性があり、その入力が予期しないサイズに切り捨てられるという問題が回避されます。

適用対象

AesGcm(ReadOnlySpan<Byte>, Int32)

ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs
ソース:
AesGcm.cs

指定されたキーと必要なタグ サイズを使用して、 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 パラメーターは、EncryptまたはDecryptのタグ パラメーターが正確にこのサイズである必要があることを示すために使用されます。 必要なタグ サイズを指定すると、 Decrypt の呼び出し元が入力としてタグを指定する可能性があり、その入力が予期しないサイズに切り捨てられるという問題が回避されます。

適用対象