extern crate libpasta;
extern crate ring;
use ring::hkdf;
fn main() {
let hash_primitive = libpasta::primitives::Scrypt::default();
let mut config = libpasta::Config::with_primitive(hash_primitive);
let key = b"yellow submarine";
let key_id = config.add_key(key);
let keyed_function = libpasta::primitives::Hmac::with_key_id(hkdf::HKDF_SHA256, &key_id);
config.set_keyed_hash(keyed_function);
let hash = config.hash_password("hunter2");
println!("Computed hash: {:?}", hash);
assert!(hash.starts_with("$!$hmac"));
assert!(hash.contains("scrypt"));
}