Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
GenerateKey generates a random encryption key
func RunDecrypt ¶
func RunDecrypt(w io.Writer, args []string, opts CryptOptions) error
RunDecrypt decrypts data using AES-256-GCM
func RunEncrypt ¶
func RunEncrypt(w io.Writer, args []string, opts CryptOptions) error
RunEncrypt encrypts data using AES-256-GCM
Types ¶
type CryptOptions ¶
type CryptOptions struct {
Password string // -p: password for encryption
PasswordFile string // -P: read password from file
KeyFile string // -k: use key file
Salt string // -s: salt for key derivation
Iterations int // -i: PBKDF2 iterations (default 100000)
Output string // -o: output file
Base64 bool // -b: base64 encode/decode
Armor bool // -a: ASCII armor output (same as -b)
}
CryptOptions configures the encrypt/decrypt command behavior
Click to show internal directories.
Click to hide internal directories.