Documentation ¶
Index ¶
- func Base64DecodeInnerEncryptedString(s string) ([]byte, error)
- func Base64EncodeEncryptedString(src []byte) string
- func DecryptString(key, nonce []byte, s string) (string, error)
- func EncryptString(key, nonce []byte, s string) (string, error)
- func GCMDecrypt(key, nonce, ciphertext []byte) ([]byte, error)
- func GCMEncrypt(key, nonce, plaintext []byte) ([]byte, error)
- func InnerEncryptedString(s string) string
- func IsEncryptedString(s string) bool
- func Key16(password []byte) ([]byte, error)
- func Key32(password []byte) ([]byte, error)
- func Nonce() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64DecodeInnerEncryptedString ¶
Base64DecodeInnerEncryptedString returns the bytes represented by the base64 inner "encrypted string" surrounded by ENC(...).
func Base64EncodeEncryptedString ¶
Base64EncodeEncryptedString returns the base64 encoding of "encrypted string" surrounded by ENC(...).
func DecryptString ¶
DecryptString decrypts a string s
func EncryptString ¶
EncryptString encrypts a string s.
func GCMDecrypt ¶
GCMDecrypt the key argument should be the AES key, either 16 or 32 bytes to select AES-128 or AES-256.
func GCMEncrypt ¶
GCMEncrypt the key argument should be the AES key, either 16 or 32 bytes to select AES-128 or AES-256.
func InnerEncryptedString ¶
InnerEncryptedString returns the inner "encrypted string" surrounded by ENC(...).
func IsEncryptedString ¶
IsEncryptedString a string is considered "encrypted" when it appears surrounded by ENC(...).
Types ¶
This section is empty.