Documentation ¶
Overview ¶
Package secret provide functions to encrypting and decrypting text such that the text can be persisted in a configuration file (xml / yaml / json etc.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode takes a cipher text and a boolean indicating whether or not to decrypt the cipher text using a password, and returns the resulting plain text. If the cipher text is an empty string, this function will panic.
func Encode ¶
Encode takes a plain text string and a boolean indicating whether or not to encrypt the plain text using a password, and returns the resulting cipher text. If the plain text is an empty string, this function will panic.
func Generate ¶
func Generate(passwordLength, minSpecialChar, minNum, minUpperCase int, specialCharSet string) string
Generate generates a random password of a specified length. The password will contain at least the specified number of special characters, numeric digits, and upper-case letters. The remaining characters in the password will be selected from a combination of lower-case letters, special characters, and numeric digits. The special characters are chosen from the provided special character set. The generated password is returned as a string.
func Initialize ¶
func Initialize(handler func(err error))
Types ¶
This section is empty.
Notes ¶
Bugs ¶
Encryption not yet implemented on linux
Encryption not yet implemented on linux