MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / generate

Method generate

atomic-core/src/kg/project_id.rs:33–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32impl ProjectId {
33 pub fn generate() -> Self {
34 let mut bytes = [0; 32];
35 rand::rngs::OsRng.fill_bytes(&mut bytes);
36 Self(bytes)
37 }
38 pub fn from_base32(s: &str) -> Result<Self, ProjectIdError> {
39 strict_base32(s).map(Self)
40 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected