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

This commit is contained in:
lixen committed 2025-11-04 01:25:47 -05:00
1 parent 80b43ca23b
commit 147fb13682
14 files changed
+760 -482

No files matched your search

+4
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)