Documentation ¶
Index ¶
- Variables
- func AesDecrypt(cipherText []byte, passPhrase string) (string, error)
- func AesEncrypt(plainText string, passPhrase string) []byte
- func CreateToken(text string, passphrase string) string
- func DecryptToken(token string, passphrase string) (string, error)
- func Detokenize(text string, passphrase string) (string, error)
- func Tokenize(text string, passphrase string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotDecryptTokenContent = errors.New("unable to decrypt the token's content")
View Source
var ErrInvalidToken = errors.New("invalid token")
Functions ¶
func AesDecrypt ¶
AesDecrypt attempts to decrypt the provided bytes with the given passPhrase provided that it has been encrypted with AES256-GCM encryption
func AesEncrypt ¶
AesEncrypt uses AES256GCP to encrypt the provided plainText string using the given passPhrase
func CreateToken ¶
CreateToken creates an encrypted substitution token from the given value
func DecryptToken ¶
DecryptToken extracts the payload from the provided substition token and decrypts its value using the given key
func Detokenize ¶
Detokenize replaces all the encoded token by their clear text value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.