Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Password salt number of bytes. ARGON2_SALT_LEN = 16 // Argon2 time parameter. ARGON2_TIME = 1 // Argon2 memory parameter (in KiB). ARGON2_MEMORY = 64 * 1024 // Argon2 thread parameter. ARGON2_THREADS = 4 // Length of the hashed key. ARGON2_KEY_LEN = 32 // Stored password format string. // Format: "<algorithm>$<algorithm_ver>$<time>$<memory>$<threads>$<salt>$<hash>" ARGON2_FORMAT = "argon2id$%d$%d$%d$%d$%s$%s" // Separator between parameters. ARGON2_FORMAT_SEP = "$" // How many parameters are stored in the ARGON2_FORMAT // argon2id + version + time + memory + threads + salt + hash ARGON2_FORMAT_COUNT = 7 )
Variables ¶
This section is empty.
Functions ¶
func CmpPassword ¶
Compare an encoded password using the encoding described in ARGON2_FORMAT with a plaintext password.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.