<PackageReference Include="Microsoft.Bcl.Cryptography" Version="11.0.0-preview.2.26159.112" />

System.Security.Cryptography.AesGcm

public sealed class AesGcm : IDisposable
Represents an Advanced Encryption Standard (AES) key to be used with the Galois/Counter Mode (GCM) mode of operation.
namespace System.Security.Cryptography { public sealed class AesGcm : IDisposable { public static KeySizes NonceByteSizes { get; } public int? TagSizeInBytes { get; } public static KeySizes TagByteSizes { get; } public static bool IsSupported { get; } public AesGcm(ReadOnlySpan<byte> key, int tagSizeInBytes); public AesGcm(byte[] key, int tagSizeInBytes); public void Encrypt(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[] associatedData = null); public void Encrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> plaintext, Span<byte> ciphertext, Span<byte> tag, ReadOnlySpan<byte> associatedData = default(ReadOnlySpan<byte>)); public void Decrypt(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[] associatedData = null); public void Decrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> tag, Span<byte> plaintext, ReadOnlySpan<byte> associatedData = default(ReadOnlySpan<byte>)); public void Dispose(); } }