datasec

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package datasec provides at-rest encryption for secrets stored in SQLite. The key lives in dataDir/secrets.key (mode 0600) and is excluded from backups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(s string) (string, error)

Decrypt returns plaintext; values without enc:v1: pass through (legacy rows).

func Encrypt

func Encrypt(s string) (string, error)

Encrypt returns s unchanged when empty; otherwise an enc:v1:… blob.

func EncryptFile

func EncryptFile(path string) ([]byte, error)

EncryptFile reads path and returns encrypted bytes (AES-GCM, random nonce prepended).

func Init

func Init(dataDir string) error

Init loads or creates the per-install encryption key. Call once before opening the store.

func KeyFileName

func KeyFileName() string

KeyFileName is the basename excluded from backup archives.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL