Skip to main content

RECOMMENDED_SALT_LEN

Constant RECOMMENDED_SALT_LEN 

Source
pub(crate) const RECOMMENDED_SALT_LEN: usize = 16;
Expand description

Recommended length of a salt: 16-bytes.

This recommendation comes from the PHC string format specification:

The role of salts is to achieve uniqueness. A random salt is fine for that as long as its length is sufficient; a 16-byte salt would work well (by definition, UUID are very good salts, and they encode over exactly 16 bytes). 16 bytes encode as 22 characters in B64.