Struct djangohashers::Django
[−]
[src]
pub struct Django { pub version: Version, }
Abstraction that exposes the functions that generates passwords compliant with different Django versions.
Example:
let django = Django {version: Version::V19}; let encoded = django.make_password("KRONOS");
Fields
version: Version
Django Version.
Methods
impl Django
[src]
fn make_password_with_settings(&self,
password: &str,
salt: &str,
algorithm: Algorithm)
-> String
password: &str,
salt: &str,
algorithm: Algorithm)
-> String
Based on the defined Django version, generates an encoded hash given a complete set of parameters: password, salt and algorithm.
fn make_password_with_algorithm(&self,
password: &str,
algorithm: Algorithm)
-> String
password: &str,
algorithm: Algorithm)
-> String
Based on the defined Django version, generates an encoded hash given a password and algorithm, uses a random salt.
fn make_password(&self, password: &str) -> String
Based on the defined Django version, generates an encoded hash given only a password, uses a random salt and the PBKDF2 algorithm.