e2ee/password

Search:
Group by:

Procs

proc deriveKeyFromPassword(password: string; salt: RandomBytes): Key32 {.
    ...raises: [], tags: [], forbids: [].}
Derive a 32-byte key from a password and salt using Argon2id
proc generatePassword(master: string; salt: string; length: int): string {.
    ...raises: [], tags: [TimeEffect], forbids: [].}
Generate a deterministic password based on a master password and a salt
proc hashPassword(password: string): string {....raises: [OSError, ValueError],
    tags: [], forbids: [].}
Hash a password for storage using Argon2id. Returns a hex string of the form "hex(salt):hex(hash)"
proc verifyPassword(password, stored: string): bool {....raises: [ValueError],
    tags: [], forbids: [].}
Verify a password against a stored hash. The stored hash should be in the format "hex(salt):hex(hash)"