Documentation ¶
Overview ¶
Package brcrypt provides useful encryption and hashing functions.
Package brcrypt provides useful encryption and hashing functions.
Package brcrypt provides useful encryption and hashing functions.
Index ¶
- Constants
- func AesDecrypt(value string, key []byte) (string, error)
- func AesEncrypt(value string, key []byte) (string, error)
- func AesKey128() ([]byte, error)
- func AesKey192() ([]byte, error)
- func AesKey256() ([]byte, error)
- func BcryptHash(value string, cycles int) (string, error)
- func BcryptPasswordCompare(hashA string, hashB string) error
- func HashMd5(value string) string
- func HashSha1(value string) string
- func HashSha256(value string) string
- func HashSha384(value string) string
- func HashSha512(value string) string
- func MustAesDecrypt(value string, key []byte) string
- func MustAesEncrypt(value string, key []byte) string
- func MustBcryptHash(value string, cycles int) string
Constants ¶
const ( AesKeyLength128 = 16 AesKeyLength192 = 24 AesKeyLength256 = 32 )
Constants
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt Aes decrypt in GCM mode value with key, depending on key length determines the AES algorithm that will be used.
func AesEncrypt ¶
AesEncrypt Aes encrypt in GCM mode value with key, depending on key length determines the AES algorithm that will be used.
func BcryptHash ¶
BcryptHash Bcrypt hash with defined number of cycles.
func BcryptPasswordCompare ¶
BcryptPasswordCompare Bcrypt hash compare.
func MustAesDecrypt ¶
MustAesDecrypt Aes decrypt in GCM mode value with key, depending on key length determines the AES algorithm that will be used. Panics on error.
func MustAesEncrypt ¶
MustAesEncrypt Aes encrypt in GCM mode value with key, depending on key length determines the AES algorithm that will be used. Panics on error.
func MustBcryptHash ¶
MustBcryptHash Bcrypt hash with defined number of cycles. Panics on error.
Types ¶
This section is empty.