Documentation
¶
Index ¶
Constants ¶
const KeyFileSize = 32 // 256 bits for AES-256
const ThreeNcrPrefix = "3ncr.org/1#"
ThreeNcrPrefix is the header of the 3ncr.org/1 encrypted-string format that all new encryptions use. Stored values without it are in the legacy format (base64url of AES-256-GCM nonce||ciphertext||tag, as written by ODDK <= 0.1.28 via cryptopasta); the daemon re-encrypts those at startup, and DecryptPassword keeps a legacy fallback for rows that pre-date the sweep.
Variables ¶
This section is empty.
Functions ¶
func DecryptPassword ¶
DecryptPassword decrypts a stored value with the master key, handling both the 3ncr.org/1 format and the legacy pre-0.1.29 format.
func EncryptPassword ¶
EncryptPassword encrypts a password with the master key in the 3ncr.org/1 format (AES-256-GCM with the raw 32-byte key, self-describing header).
func GetOrCreateKeyFile ¶
GetOrCreateKeyFile gets or creates the master key file
func IsLegacyCiphertext ¶
IsLegacyCiphertext reports whether a stored value is in the legacy format and should be re-encrypted (used by the daemon's startup sweep).
Types ¶
This section is empty.