Versions in this module Expand all Collapse all v0 v0.0.7 Oct 27, 2026 v0.0.6 Oct 16, 2026 Changes in this version + func EnvFileHoldsKey(path string) bool + type KeyFileInstall = EnvInstall + func WriteKeyFile(path string, key []byte, replace bool, now time.Time) (KeyFileInstall, error) v0.0.5 Oct 12, 2026 Changes in this version + const AEADAESGCM + const EnvKey + const KDFArgon2id + const Kind + const MinPassphraseLength + const Version + var DefaultParams = Params + var ErrNoKey = errors.New("keyescrow: " + EnvKey + " is not set") + var ErrNotEscrow = errors.New("keyescrow: not a cloop key escrow file") + var ErrOpen = errors.New("keyescrow: wrong passphrase, or the file was altered") + var ErrParams = errors.New("keyescrow: argon2id parameters out of bounds") + var ErrUnsupported = errors.New("keyescrow: unsupported escrow format") + var ErrWeakPassphrase = errors.New("keyescrow: passphrase refused") + func CheckDestination(path string) error + func CheckPassphrase(passphrase []byte) error + func Fingerprint(key []byte) (string, error) + func SaveRecord(db *statedb.DB, r Record) error + func WriteFile(path string, f *File, replace bool) error + func Zero(b []byte) + type AEAD struct + Alg string + Nonce string + type EnvInstall struct + Created bool + Path string + Previous string + Unchanged bool + func WriteEnvFile(path string, key []byte, replace bool, now time.Time) (EnvInstall, error) + type File struct + AEAD AEAD + Ciphertext string + CreatedAt string + CreatedBy string + Hub string + ID string + KDF KDF + KeyFingerprint string + Kind string + Version int + func Parse(data []byte) (*File, error) + func ReadFile(path string) (*File, error) + func Wrap(key, passphrase []byte, opts WrapOptions) (*File, error) + func (f *File) Created() time.Time + func (f *File) Marshal() ([]byte, error) + func (f *File) Open(passphrase []byte) ([]byte, error) + func (f *File) Record(by string, at time.Time) Record + func (f *File) Validate() error + type KDF struct + Alg string + Salt string + type Params struct + MemoryKiB uint32 + Threads uint8 + Time uint32 + func (p Params) String() string + type Record struct + CreatedAt string + CreatedBy string + ID string + KDF string + KeyFingerprint string + RecordedAt string + RecordedBy string + func LoadRecord(db *statedb.DB) (Record, bool, error) + func ReadRecord(conn *sql.DB) (Record, bool, error) + func (r Record) Created() time.Time + type WrapOptions struct + CreatedBy string + Hub string + Now time.Time + Params Params