Table of Contents

Method Seal

Namespace
MailFathom.Common
Assembly
MailFathom.Common.dll

Seal(ReadOnlySpan<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>)

Seals a value.

public static byte[] Seal(ReadOnlySpan<byte> key, ReadOnlySpan<byte> plaintext, ReadOnlySpan<byte> associatedData)

Parameters

key ReadOnlySpan<byte>

The key, of KeySizeInBytes bytes.

plaintext ReadOnlySpan<byte>

The value to seal.

associatedData ReadOnlySpan<byte>

What the sealed value is bound to, authenticated but not encrypted.

Returns

byte[]

The sealed value.

Exceptions

ArgumentException

Thrown when the key is not KeySizeInBytes bytes.

CryptographicException

Thrown when the platform refuses the operation.