Versions in this module Expand all Collapse all v0 v0.1.1 Jun 19, 2026 Changes in this version + var ErrInconsistentKeyState = errors.New("encryption key metadata is inconsistent with keychain") + var ErrKeyAlreadyExists = errors.New("encryption key already exists in keychain") v0.1.0 Jun 4, 2026 Changes in this version + var ErrInvalidCiphertext = errors.New("invalid ciphertext") + var ErrInvalidConfig = errors.New("invalid config") + var ErrKeyNotFound = errors.New("encryption key not found") + var ErrUnsupportedKeyVersion = errors.New("unsupported key version") + type Config struct + DBPath string + Keychain KeychainConfig + type EncryptedBlob struct + Ciphertext []byte + KeyVersion int + Nonce []byte + type KeychainConfig struct + Account string + Service string + type Store struct + func Open(cfg Config) (*Store, error) + func OpenWithKeyring(cfg Config, kr keyring.Keyring) (*Store, error) + func (s *Store) Close() error + func (s *Store) DB() *sql.DB + func (s *Store) Decrypt(_ context.Context, blob EncryptedBlob, aad []byte) ([]byte, error) + func (s *Store) DecryptJSON(ctx context.Context, blob EncryptedBlob) ([]byte, error) + func (s *Store) Encrypt(_ context.Context, plaintext, aad []byte) (*EncryptedBlob, error) + func (s *Store) EncryptJSON(ctx context.Context, rawJSON []byte) (*EncryptedBlob, error) + func (s *Store) RotateKey(_ context.Context) (int, error)