Fact.Seam.FileWriter.Encrypted.V1 (Fact v0.4.0)
View SourceEncrypted V1 implementation of Fact.Seam.FileWriter.
Encrypts the value before writing it to disk. Each file is written with a header containing a random nonce and authentication tag, followed by the ciphertext.
The file format is:
<<nonce::12-bytes, auth_tag::16-bytes, ciphertext::binary>>The Data Encryption Key (DEK) is retrieved from Fact.KeyRing at write time.
Options
:cipher- The cipher algorithm. Currently only:aes_gcmis supported. Defaults to:aes_gcm.:access- File access mode (:writeor:append). Defaults to:write.:binary- Whether to open in binary mode. Defaults totrue.:exclusive- Fail if the file already exists. Defaults totrue.:raw- Use raw file descriptors. Defaults tofalse.:sync- Fsync after write. Defaults tofalse.:worm- Mark file read-only after write. Defaults tofalse.