password_ 0.1.2

Simple and secure password hashing library based on Argon2 / 基于 Argon2 的简单安全密码哈希库
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use aok::{OK, Void};
use log::info;

#[static_init::constructor(0)]
extern "C" fn _log_init() {
  log_init::init();
}

#[test]
fn test() -> Void {
  let password = "test";
  let (salt, hash) = password_::hash(password);
  info!("{salt:?} {hash:?}");
  assert!(password_::verify(password, salt, hash));
  OK
}