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
keyReadOnlySpan<byte>The key, of KeySizeInBytes bytes.
plaintextstringThe text to seal.
associatedDatastringWhat 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.