MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / generate_key

Function generate_key

crates/hyperqueue/src/transfer/auth.rs:6–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const KEY_SIZE: usize = 32;
5
6pub fn generate_key() -> SecretKey {
7 SecretKey::generate(KEY_SIZE).unwrap()
8}
9pub fn serialize_key(key: &SecretKey) -> String {
10 let bytes = key.unprotected_as_bytes();
11 hex::encode(bytes)

Callers 5

start_serverFunction · 0.50
test_store_loadFunction · 0.50

Calls 1

generateFunction · 0.85

Tested by 3

test_store_loadFunction · 0.40