Documentation
¶
Index ¶
- Constants
- func DecryptAESGCM(encrypted []byte, masterKeyPath string) (string, error)
- func EncryptAESGCM(plainText string, masterKeyPath string) ([]byte, error)
- func GenerateKey(length int) ([]byte, error)
- func GenerateMasterKey() ([]byte, error)
- func GeneratePassword(length int) (string, error)
- func IsSubdir(baseDir string, path string) bool
- func NewAESGCM(masterKeyPath string) (cipher.AEAD, error)
- func Trunc(sensitive string) string
- func TruncLastLine(sensitive string) string
- func TruncLastLines(sensitive string, n int) string
- func TruncParamHeader(header, key string) string
Constants ¶
View Source
const Redacted = "**REDACTED**"
Variables ¶
This section is empty.
Functions ¶
func DecryptAESGCM ¶
Decrypt data encrypted with AES-GCM (nonce+ciphertext), returning the plain text
func EncryptAESGCM ¶
Encrypt plain text using AES-GCM, returning nonce+ciphertext
func GenerateKey ¶
Produces a key with the given byte-length
func GenerateMasterKey ¶
Produces a AES-256 master key (32 bytes)
func GeneratePassword ¶
Produces an alphanumeric placeholder password
func TruncLastLine ¶
func TruncLastLines ¶
func TruncParamHeader ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.