Skip to content

AEAD crypto

Bruce Wayne edited this page Jul 21, 2021 · 2 revisions

Create

IAEADCrypto crypto = AEADCryptoCreate.AesGcm(ReadOnlySpan<byte> key);
IAEADCrypto crypto = AEADCryptoCreate.Sm4Gcm(ReadOnlySpan<byte> key);
IAEADCrypto crypto = AEADCryptoCreate.ChaCha20Poly1305(ReadOnlySpan<byte> key);
IAEADCrypto crypto = AEADCryptoCreate.XChaCha20Poly1305(ReadOnlySpan<byte> key);

Properties

Property Description
Name Name of the crypto

Methods

Method Description
void Encrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> source, Span<byte> destination, Span<byte> tag, ReadOnlySpan<byte> associatedData); Encrypt the data
void Decrypt(ReadOnlySpan<byte> nonce, ReadOnlySpan<byte> source, ReadOnlySpan<byte> tag, Span<byte> destination, ReadOnlySpan<byte> associatedData); Decrypt the data
void Dispose() Releases the resources

Data format extensions

KDF

Symmetric crypto

Clone this wiki locally