AesGcm 類別

定義

表示要搭配 Galois/計數器模式 (GCM) 模式作業使用的進階加密標準 (AES) 金鑰。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
繼承
AesGcm
實作

建構函式

AesGcm(Byte[])

使用提供的金鑰,初始化 AesGcm 類別的新執行個體。Initializes a new instance of the AesGcm class with a provided key.

AesGcm(ReadOnlySpan<Byte>)

使用提供的金鑰,初始化 AesGcm 類別的新執行個體。Initializes a new instance of the AesGcm class with a provided key.

屬性

NonceByteSizes

取得這個執行個體支援的 nonce 大小 (以位元組為單位)。Gets the nonce sizes, in bytes, supported by this instance.

TagByteSizes

取得這個執行個體支援的標記大小 (以位元組為單位)。Gets the tag sizes, in bytes, supported by this instance.

方法

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

如果可對驗證標記進行驗證,則將加密文字解密至提供的目的地緩衝區。Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated.

Dispose()

AesGcm 類別的目前執行個體所使用的資源釋出。Releases the resources used by the current instance of the AesGcm class.

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

將純文字加密至加密文字目的地緩衝區,並在另一個緩衝區中產生驗證標記。Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於