Table of Contents

Method OpenText

Namespace
MailFathom.Common
Assembly
MailFathom.Common.dll

OpenText(ReadOnlySpan<byte>, string, string)

public static string OpenText(ReadOnlySpan<byte> key, string sealedValue, string associatedData)

Parameters

key ReadOnlySpan<byte>

The key it was sealed with.

sealedValue string

The base64-encoded sealed value.

associatedData string

What it was bound to when it was sealed.

Returns

string

The text.

Exceptions

ArgumentNullException

Thrown when an argument is null.

ArgumentException

Thrown when the key is not KeySizeInBytes bytes.

FormatException

Thrown when the value is not base64.

CryptographicException

Thrown when the value does not open, for any of the reasons Open(ReadOnlySpan<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>) states.