MCPcopy Create free account
hub / github.com/cosdata/cosdata / double_hash_password

Function double_hash_password

org/src/session_token.rs:41–45  ·  view source on GitHub ↗
(password: &str)

Source from the content-addressed store, hash-verified

39}
40
41fn double_hash_password(password: &str) -> Vec<u8> {
42 let mut context = digest::Context::new(&digest::SHA256);
43 context.update(&hash_password(password));
44 context.finish().as_ref().to_vec()
45}
46
47fn generate_server_key() -> [u8; 32] {
48 let rng = SystemRandom::new();

Callers

nothing calls this directly

Calls 1

hash_passwordFunction · 0.85

Tested by

no test coverage detected