Documentation ¶
Index ¶
- Constants
- func DealPflag()
- func DeclarePflags()
- func Decrypt(cipherText, password string, iterations int) (string, error)
- func DecryptSalt(cipherText, password, fixedSalt string, iterations int) (string, error)
- func Ebp(p string) (string, error)
- func Encrypt(plainText, password string, iterations int) (string, error)
- func EncryptSalt(plainText, password, fixedSalt string, iterations int) (string, error)
- func GetPbePwd() string
- func Pbe(p string) (string, error)
- func PrintDecrypt(passStr string, cipherText ...string)
- func PrintEncrypt(passStr string, plains ...string)
Constants ¶
View Source
const PbePwd = "pbepwd"
PbePwd defines the keyword for client flag.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt PrintDecrypt the cipherText(result of Encrypt) based on password and iterations.
func DecryptSalt ¶
DecryptSalt PrintDecrypt the cipherText(result of EncryptSalt) based on password and iterations.
func Encrypt ¶
Encrypt PrintEncrypt the plainText based on password and iterations with random salt. The result contains the first 8 bytes salt before BASE64.
func EncryptSalt ¶
EncryptSalt PrintEncrypt the plainText based on password and iterations with fixed salt.
func Pbe ¶
Pbe encrypts p by PBEWithMD5AndDES with 19 iterations. it will prompt password if viper get none.
func PrintDecrypt ¶
PrintDecrypt prints the PBE decryption.
func PrintEncrypt ¶
PrintEncrypt prints the PBE encryption.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.