Merge pull request #17 from jxs/master

update ring to version 0.11.0
This commit is contained in:
Antoine Gersant 2017-12-07 15:49:15 -08:00 committed by GitHub
commit a35a9907ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 397 additions and 340 deletions

733
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ mount = "0.3.0"
params = { git = "https://github.com/euclio/params", branch="update" }
rand = "0.3.15"
regex = "0.2.2"
ring = "0.9.7"
ring = "0.11.0"
reqwest = "0.6.2"
router = "0.5.1"
secure-session = "0.2.0"

View file

@ -17,7 +17,7 @@ pub struct User {
pub admin: i32,
}
static DIGEST_ALG: &'static pbkdf2::PRF = &pbkdf2::HMAC_SHA256;
static DIGEST_ALG: &'static digest::Algorithm = &digest::SHA256;
const CREDENTIAL_LEN: usize = digest::SHA256_OUTPUT_LEN;
const HASH_ITERATIONS: u32 = 10000;
type PasswordHash = [u8; CREDENTIAL_LEN];