Documentation ¶
Index ¶
- Variables
- func CompareHash(password, hash string) (match bool, err error)
- func HashPassword(str string) (string, error)
- func HashWithParams(str string, params *Params) (string, error)
- func RandomBase64String(size uint32) (string, error)
- func RandomBytes(size uint32) ([]byte, error)
- func RandomHexString(size uint32) (string, error)
- type Params
- type SymSecret
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("argon2-incorrect-hash") ErrIncompatibleVersion = errors.New("argon2-incorrect-version") )
View Source
var DefaultParams = &Params{
memory: 64 * 1024,
iterations: 3,
parallelism: 2,
saltLength: 16,
keyLength: 32,
}
View Source
var (
ErrInvalidNonceSize = errors.New("krypt-invalid-nonce-size")
)
Functions ¶
func CompareHash ¶
func HashPassword ¶
func RandomBase64String ¶
func RandomBytes ¶
func RandomHexString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.