Method RevealAsString
- Namespace
- MailFathom.Infrastructure.Secrets.Resolution
- Assembly
- MailFathom.Infrastructure.dll
RevealAsString()
Reveals the material as its UTF-8 text view, with one trailing newline removed.
public string RevealAsString()
Returns
- string
The decoded text.
Remarks
The returned string cannot be erased and persists until the collector reclaims it, so this accessor exists only
for framework contracts that take a string — the IMAP client's authentication call and the
PostgreSQL connection-string password. Call it at that boundary, as late as possible, and never store, log, or
pass on the result. The newline trim belongs to the text view alone: LoadCredential=, Compose secrets, and
Kubernetes Secret files routinely end with one, and an untrimmed byte presents as a wrong password.
Exceptions
- ObjectDisposedException
Thrown when the material has already been erased.