mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
10 lines
399 B
Rust
10 lines
399 B
Rust
use codex_proxy_rs::infra::identity::{hash_admin_password, verify_admin_password};
|
|
|
|
#[test]
|
|
fn admin_password_hash_should_not_accept_client_api_key_string() {
|
|
let hash = hash_admin_password("correct horse battery staple").unwrap();
|
|
|
|
assert!(verify_admin_password("correct horse battery staple", &hash).unwrap());
|
|
assert!(!verify_admin_password("cpr_fake_client_key", &hash).unwrap());
|
|
}
|