AesGcm 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| AesGcm(Byte[]) |
已过时.
使用提供的键初始化类的新实例 AesGcm 。 |
| AesGcm(ReadOnlySpan<Byte>) |
已过时.
使用提供的键初始化类的新实例 AesGcm 。 |
| AesGcm(Byte[], Int32) |
使用提供的键和所需的标记大小初始化类的新实例 AesGcm 。 |
| AesGcm(ReadOnlySpan<Byte>, Int32) |
使用提供的键和所需的标记大小初始化类的新实例 AesGcm 。 |
AesGcm(Byte[])
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- 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>)
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- 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)
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- 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参数用于指示标记参数必须EncryptDecrypt恰好是此大小。 指示所需的标记大小可防止调用方 Decrypt 提供标记作为输入的问题,并且该输入被截断为意外大小。
适用于
AesGcm(ReadOnlySpan<Byte>, Int32)
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- AesGcm.cs
- Source:
- 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参数用于指示标记参数必须EncryptDecrypt恰好是此大小。 指示所需的标记大小可防止调用方 Decrypt 提供标记作为输入的问题,并且该输入被截断为意外大小。