Versions in this module Expand all Collapse all v0 v0.6.0 Oct 21, 2026 v0.5.0 Oct 14, 2026 Changes in this version + const DEKSize + const SaltSize + var ErrNotEnvelope = errors.New("crypto: payload is not an envelope") + func EnvelopeKeyID(sealed []byte) (string, error) + func GenerateLocalKey() ([]byte, error) + func GenerateSalt() ([]byte, error) + func IsEnvelope(payload []byte) bool + func Open(ctx context.Context, provider KeyProvider, sealed []byte, ...) ([]byte, error) + func Seal(ctx context.Context, provider KeyProvider, scope string, plaintext []byte, ...) ([]byte, error) + type KeyProvider interface + GenerateDataKey func(ctx context.Context, scope string) (plaintext []byte, wrapped []byte, err error) + ID func() string + UnwrapKey func(ctx context.Context, kekID string, wrapped []byte) ([]byte, error) + func NewKeySet(active KeyProvider, retired ...KeyProvider) (KeyProvider, error) + func NewLocalFileKeyProvider(path string) (KeyProvider, error) + func NewPassphraseKeyProvider(passphrase string, salt []byte) (KeyProvider, error)