Documentation ¶
Index ¶
- func ComparePasswordAndHash(password, encodedHash string) (match bool, err error)
- func DecryptAES(encryptedinput string, secret string) string
- func EncryptToAES(input string, secret string) string
- func GenerateFromPassword(password string) (encodedHash string, err error)
- func GenerateRandomSecret() string
- func RandomString(len int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswordAndHash ¶ added in v1.1.0
ComparePasswordAndHash Compares the input password and the previously generated hash and checks if plain password matches the encrypted password
func DecryptAES ¶ added in v1.1.0
DecryptAES decrypts a encrypted aes string data to plain text
func EncryptToAES ¶ added in v1.1.0
EncryptToAES encrypts the given plain text data to encrypted string
func GenerateFromPassword ¶ added in v1.1.0
GenerateFromPassword generates a argon2 hash on the input password
func GenerateRandomSecret ¶ added in v1.1.0
func GenerateRandomSecret() string
GenerateRandomSecret generates a random 32 byte secret to use for encryption
func RandomString ¶ added in v1.2.0
RandomString Generates a random string of A-Z chars with len = l
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.