v0.2.0 restructured and generalized to be more modular, added golang-jwt dependency

This commit is contained in:
2025-11-03 15:11:40 -05:00
parent 3a662862d7
commit 3471030edd
14 changed files with 760 additions and 482 deletions

View File

@ -143,6 +143,10 @@ func DeriveCredential(username, password string, salt []byte, time, memory uint3
return nil, ErrSCRAMSaltTooShort
}
if time == 0 || memory == 0 || threads == 0 {
return nil, ErrSCRAMZeroParams
}
// Derive salted password using Argon2id
saltedPassword := argon2.IDKey([]byte(password), salt, time, memory, threads, DefaultArgonKeyLen)