Class EncryptedFileContent
- Namespace
- Oscova.Agents.Secrets
- Assembly
- Oscova.Agents.dll
Owns encrypted-file identification and authenticated content opening.
public static class EncryptedFileContentInheritance
Inherited Members
Fields
- FileExtension
-
The suffix appended to encrypted file names.
- ProtectionPurpose
-
The protection purpose shared by encrypted-file readers and writers.
Methods
- HasEnvelopeMarker(ReadOnlySpan<byte>)
-
Returns whether stored content starts with the encrypted envelope's version marker, such as
v1.. - IsEncryptedPath(string)
-
Returns whether the path uses the encrypted-file extension.
- ReadAllText(string, string, IContentProtector)
-
Reads a complete encrypted file, or returns null when it is absent.
- ReadAllTextAsync(string, string, IContentProtector, CancellationToken)
-
Reads and decrypts a whole encrypted file, or returns null when it does not exist.
- TryDecrypt(string, string, string, IContentProtector, out string, string)
-
Attempts to decrypt an encrypted-file payload, leaving raw content unchanged on failure.
- WriteAllText(string, string, string, IContentProtector)
-
Encrypts and atomically replaces a whole file.
- WriteAllTextAsync(string, string, string, IContentProtector, CancellationToken)
-
Encrypts and atomically replaces a whole file as one envelope.