Method RevealTextInto
- Namespace
- MailFathom.Infrastructure.Secrets.Resolution
- Assembly
- MailFathom.Infrastructure.dll
RevealTextInto(Span<char>)
Decodes the material as UTF-8 text into a caller-owned buffer, with one trailing newline removed.
public void RevealTextInto(Span<char> destination)
Parameters
destinationSpan<char>A buffer of at least TextLength characters.
Remarks
This is the erasable counterpart to RevealAsString(), for a framework contract that accepts a ReadOnlySpan<T> of characters rather than a string — loading a password-protected PKCS#12 bundle is the case that exists today. The caller owns the buffer and must erase it, which is what keeps a secret out of an un-erasable string wherever the platform makes that avoidable.
Exceptions
- ObjectDisposedException
Thrown when the material has already been erased.
- ArgumentException
Thrown when
destinationis too small.