Documentation
¶
Overview ¶
Package auth provides password hashing and verification utilities using the argon2id algorithm for secure credential storage.
Index ¶
Constants ¶
View Source
const ( Argon2Time = 1 Argon2Memory = 64 * 1024 // 64 MB Argon2Threads = 4 Argon2KeyLen = 32 Argon2SaltLen = 16 )
Argon2 parameters
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword verifies a password against an Argon2id hash.
func HashArgon2 ¶ added in v0.1.0
HashArgon2 creates an Argon2id hash of the input string. Returns encoded hash in format: $argon2id$v=19$m=65536,t=1,p=4$salt$hash
func HashPassword ¶
HashPassword creates an Argon2id hash of the password.
func VerifyArgon2 ¶ added in v0.1.0
VerifyArgon2 verifies an input string against an Argon2id hash. Uses constant-time comparison to prevent timing attacks.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.