Function django_auth

Source
pub fn django_auth(
    password: &str,
    encoded_password: &str,
) -> Result<bool, Error>
Expand description

Verify password based on encoded_password which is managed by Django, return Ok(true) if verification is successful, otherwise return false.

Currently only the default pbkdf2_sha256 algorithm is supported.

ยงUsage

use django_auth::*;

let res = django_auth(
    "hello",
    "pbkdf2_sha256$180000$btQDcwXF2RoK6Q$D4cC7bgbaIZGHsTdw9TYhRfuLfLGbsZlI4Rp802e7kU=",
).expect("django_auth error");

assert!(res);