Documentation
¶
Overview ¶
Package passwd hashes and verifies passwords with Argon2id, producing and consuming standard PHC strings ($argon2id$v=19$m=..,t=..,p=..$salt$hash). The cost parameters travel with each hash, so changing profiles never breaks verification of existing hashes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Standard is the OWASP minimum for Argon2id (19 MiB). Standard = Profile{MemoryKiB: 19 * 1024, Time: 2, Threads: 1} // High (32 MiB) is Ken's default for the human login. High = Profile{MemoryKiB: 32 * 1024, Time: 2, Threads: 1} )
Functions ¶
Types ¶
type Profile ¶
Profile selects Argon2id cost parameters (salt 16, hash 32, t=2, p=1 in both; only the memory cost differs). Standard is the OWASP minimum for Argon2id; Ken defaults to High because a curator account is the only thing standing between an attacker and the whole knowledge base, and logins are rare enough that the extra memory cost is never on a hot path.
Click to show internal directories.
Click to hide internal directories.