Skip to main content

Module crypto

Module crypto 

Source
Expand description

Password hashing and token generation.

CryptoHelper hashes passwords with Argon2, verifies hashes, and creates random alphanumeric tokens. Use it for storing credentials and issuing opaque tokens.

let hash = CryptoHelper::hash_password("secret")?;
assert!(CryptoHelper::verify_password(&hash, "secret")?);

Structs§

CryptoHelper
Password hashing (Argon2) and random token helpers.