Versions in this module Expand all Collapse all v0 v0.1.0 Apr 24, 2026 Changes in this version + const KeySize + var ErrCiphertextTooShort = errors.New("crypto: ciphertext is too short") + var ErrDecryptFailed = errors.New(...) + var ErrEntropySource = errors.New("crypto: failed to read random bytes") + var ErrInvalidHexFormat = errors.New("crypto: key is not a valid hex string") + var ErrInvalidKeyLength = errors.New("crypto: invalid key length for parsing") + var ErrKeyDerivation = errors.New("crypto: key derivation failed") + type Key struct + func GenerateKey() (*Key, error) + func ParseHexString(hexStr string) (*Key, error) + func (k *Key) String() string + type Secret struct + func New(key *Key, info []byte) (*Secret, error) + func (s *Secret) Decrypt(ciphertext, recordID []byte) ([]byte, error) + func (s *Secret) Encrypt(plaintext, recordID []byte) ([]byte, error)