Documentation
¶
Overview ¶
Package encrypt provides at-rest encryption for the Yaad SQLite database. Uses AES-256-GCM to encrypt the entire DB file with a user-provided key. Based on Engram's E2E encryption approach.
Usage:
yaad init --encrypt # generates key, saves to ~/.yaad/key yaad init --key <base64key> # use provided key
The DB is encrypted on disk and decrypted in memory when opened. This is file-level encryption, not SQLCipher (which requires CGO).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptFile ¶
DecryptFile decrypts a file in-place using AES-256-GCM.
func EncryptFile ¶
EncryptFile encrypts a file in-place using AES-256-GCM.
func GenerateKey ¶
GenerateKey creates a new 256-bit encryption key.
func IsEncrypted ¶
IsEncrypted checks if a file appears to be encrypted (not valid SQLite header).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.