AesGcm 类

定义

表示一个高级加密标准 (AES) 密钥,该密钥用于 Galois/Counter Mode (GCM) 操作模式。

public ref class AesGcm sealed : IDisposable
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public sealed class AesGcm : IDisposable
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public sealed class AesGcm : IDisposable
public sealed class AesGcm : IDisposable
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type AesGcm = class
    interface IDisposable
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type AesGcm = class
    interface IDisposable
type AesGcm = class
    interface IDisposable
Public NotInheritable Class AesGcm
Implements IDisposable
继承
AesGcm
属性
实现

构造函数

AesGcm(Byte[])
已过时.

使用所提供的密钥来初始化 AesGcm 类的一个新实例。

AesGcm(Byte[], Int32)

使用提供的键和所需的标记大小初始化 类的新实例 AesGcm

AesGcm(ReadOnlySpan<Byte>)
已过时.

使用所提供的密钥来初始化 AesGcm 类的一个新实例。

AesGcm(ReadOnlySpan<Byte>, Int32)

使用提供的键和所需的标记大小初始化 类的新实例 AesGcm

属性

IsSupported

获取一个值,该值指示当前平台上是否支持该算法。

NonceByteSizes

获取此实例支持的 nonce 大小(以字节为单位)。

TagByteSizes

获取此实例支持的标记大小(以字节为单位)。

TagSizeInBytes

获取标记的大小(以字节为单位)。

方法

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

如果可验证身份验证标记,则将已加密文本解密到提供的目标缓冲区中。

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

如果可验证身份验证标记,则将已加密文本解密到提供的目标缓冲区中。

Dispose()

释放 AesGcm 类的当前实例使用的资源。

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

将纯文本加密到已加密文本目标缓冲区,并将身份验证标签生成到单独的缓冲区中。

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

将纯文本加密到已加密文本目标缓冲区,并将身份验证标签生成到单独的缓冲区中。

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于