Module cryptoxide::pbkdf2

source ·
Expand description

This module implements the PBKDF2 Key Derivation Function as specified in Specification.

Examples

use cryptoxide::{pbkdf2::pbkdf2, hmac::Hmac, sha2::Sha256};

let password = b"password";
let salt = b"salt";
let c = 2;
let mut out = [0u8; 64];
pbkdf2(&mut Hmac::new(Sha256::new(), password), salt, c, &mut out);

Functions

Execute the PBKDF2 Key Derivation Function. The Scrypt Key Derivation Function generally provides better security, so, applications that do not have a requirement to use PBKDF2 specifically should consider using that function instead.