Function libpasta::hash_password [] [src]

pub fn hash_password(password: String) -> String

Generates a default hash for a given password.

Will automatically generate a random salt. In the extreme case that the default source of randomness is unavailable, this will fallback to a seed generated when the library is initialised. An error will be logged when this happens.

This is the simplest way to use libpasta, and uses sane defaults.

Panics

A panic indicates a problem with the serialization mechanisms, and should be reported.