Method OpenText
- Namespace
- MailFathom.Common
- Assembly
- MailFathom.Common.dll
OpenText(ReadOnlySpan<byte>, string, string)
Opens text sealed by SealText(ReadOnlySpan<byte>, string, string).
public static string OpenText(ReadOnlySpan<byte> key, string sealedValue, string associatedData)
Parameters
keyReadOnlySpan<byte>The key it was sealed with.
sealedValuestringThe base64-encoded sealed value.
associatedDatastringWhat 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.