security

package
v0.1.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Redacted = "**REDACTED**"

Variables

This section is empty.

Functions

func DecryptAESGCM

func DecryptAESGCM(encrypted []byte, masterKeyPath string) (string, error)

Decrypt data encrypted with AES-GCM (nonce+ciphertext), returning the plain text

func EncryptAESGCM

func EncryptAESGCM(plainText string, masterKeyPath string) ([]byte, error)

Encrypt plain text using AES-GCM, returning nonce+ciphertext

func GenerateKey

func GenerateKey(length int) ([]byte, error)

Produces a key with the given byte-length

func GenerateMasterKey

func GenerateMasterKey() ([]byte, error)

Produces a AES-256 master key (32 bytes)

func GeneratePassword

func GeneratePassword(length int) (string, error)

Produces an alphanumeric placeholder password

func IsSubdir

func IsSubdir(baseDir string, path string) bool

func NewAESGCM

func NewAESGCM(masterKeyPath string) (cipher.AEAD, error)

func Trunc

func Trunc(sensitive string) string

func TruncLastLine

func TruncLastLine(sensitive string) string

func TruncLastLines

func TruncLastLines(sensitive string, n int) string

func TruncParamHeader

func TruncParamHeader(header, key string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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