Table of Contents

Method SealText

Namespace
MailFathom.Common
Assembly
MailFathom.Common.dll

SealText(ReadOnlySpan<byte>, string, string)

Seals text into a form that can be written where only text fits.

public static string SealText(ReadOnlySpan<byte> key, string plaintext, string associatedData)

Parameters

key ReadOnlySpan<byte>

The key, of KeySizeInBytes bytes.

plaintext string

The text to seal.

associatedData string

What the sealed value is bound to.

Returns

string

The sealed value, base64-encoded.

Exceptions

ArgumentNullException

Thrown when an argument is null.

ArgumentException

Thrown when the key is not KeySizeInBytes bytes.