AesGcm AesGcm AesGcm AesGcm Class

定义

表示一个高级加密标准 (AES) 密钥,该密钥用于 Galois/Counter Mode (GCM) 操作模式。Represents an Advanced Encryption Standard (AES) key to be used with the Galois/Counter Mode (GCM) mode of operation.

public ref class AesGcm sealed : IDisposable
public sealed class AesGcm : IDisposable
type AesGcm = class
    interface IDisposable
Public NotInheritable Class AesGcm
Implements IDisposable
继承
AesGcmAesGcmAesGcmAesGcm
实现

构造函数

AesGcm(Byte[]) AesGcm(Byte[]) AesGcm(Byte[]) AesGcm(Byte[])

使用所提供的密钥来初始化 AesGcm 类的一个新实例。Initializes a new instance of the AesGcm class with a provided key.

AesGcm(ReadOnlySpan<Byte>) AesGcm(ReadOnlySpan<Byte>) AesGcm(ReadOnlySpan<Byte>) AesGcm(ReadOnlySpan<Byte>)

使用所提供的密钥来初始化 AesGcm 类的一个新实例。Initializes a new instance of the AesGcm class with a provided key.

属性

NonceByteSizes NonceByteSizes NonceByteSizes NonceByteSizes

获取此实例支持的 nonce 大小(以字节为单位)。Gets the nonce sizes, in bytes, supported by this instance.

TagByteSizes TagByteSizes TagByteSizes TagByteSizes

获取此实例支持的标记大小(以字节为单位)。Gets the tag sizes, in bytes, supported by this instance.

方法

Decrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Decrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Decrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Decrypt(Byte[], Byte[], Byte[], Byte[], Byte[])

如果可验证身份验证标记,则将已加密文本解密到提供的目标缓冲区中。Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated.

Decrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Decrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Decrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Decrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

如果可验证身份验证标记,则将已加密文本解密到提供的目标缓冲区中。Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated.

Dispose() Dispose() Dispose() Dispose()

释放 AesGcm 类的当前实例使用的资源。Releases the resources used by the current instance of the AesGcm class.

Encrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Encrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Encrypt(Byte[], Byte[], Byte[], Byte[], Byte[]) Encrypt(Byte[], Byte[], Byte[], Byte[], Byte[])

将纯文本加密到已加密文本目标缓冲区,并将身份验证标签生成到单独的缓冲区中。Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer.

Encrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Encrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Encrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Span<Byte>, ReadOnlySpan<Byte>) Encrypt(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

将纯文本加密到已加密文本目标缓冲区,并将身份验证标签生成到单独的缓冲区中。Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于