Documentation ¶
Index ¶
- Variables
- func Compare(str, hexStr string) (bool, error)
- func CompareHex(hash func() hash.Hash, str, hexStr, key string) (bool, error)
- func New(secret, data string) string
- func NewHex(hash func() hash.Hash, str string) (string, string, error)
- func PBDKF2Hex(hash func() hash.Hash, str string, key []byte) string
- func RandomBytes(l int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SaltLength = 36 KeyLength = 512 Iter = 10000 )
SaltLength specifies the length of a random byte sequence. KeyLength, Iter for pbkdf2.Key arguments.
Functions ¶
func CompareHex ¶
CompareHexHash to compare passed string and PBDKF2 as hex string.
func RandomBytes ¶
RandomBytes generate a random byte slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.