Documentation ¶
Index ¶
Constants ¶
View Source
const AesCipherKeySize = 32 // aes key size, 256 bit
Variables ¶
This section is empty.
Functions ¶
func AesDecryptRaw ¶
AesDecryptRaw decrypt original `data` with `key` and initializer vector `iv` iv should have at least `aes.BlockSize` length
func AesEncryptRaw ¶
AesEncryptRaw encrypt original `data` with `key` and initializer vector `iv` iv should have at least `aes.BlockSize` length
func BCryptHash ¶
BCryptHash encrypt original password with bcryptCost to encrypted data, then store encrypted data into database.
func BCryptValidate ¶
BCryptValidate validate password and encryptedData retrieved from database.
func SetBCryptCost ¶
func SetBCryptCost(cost int)
SetBCryptCost set global bcrypt cost, and after, all encrypt operation use this call before changed again
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.