Skip to main content

RANDOM_SALT_LEN

Constant RANDOM_SALT_LEN 

Source
pub const RANDOM_SALT_LEN: usize = 16;
Expand description

Salt length used by the *_with_random_salt entry points, in bytes.

16 is what RFC 9106 ยง4 recommends for password hashing, and is comfortably above crate::params::MIN_SALT_LENGTH. It is a constant rather than an argument because a caller who wants to choose the length also wants to choose the bytes, and should call Argon2::hash_encoded with their own salt instead.