Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArgon2Params = Argon2Params{
Memory: 64 * 1024,
Iterations: 3,
Parallelism: 2,
SaltLength: 16,
KeyLength: 32,
}
TODO: 1- import conf from env TODO: 2- read more about effects of this config TODO: 3- use a wrapper pkg to use Argon2
Functions ¶
func GenerateHash ¶
func GenerateHash(password string, p Argon2Params) (string, error)
func GenerateToken ¶
generating JWT for user
func ValidateToken ¶
validating tokens
func VerifyPassword ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.