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

Method from_public_key

atomic-identity/src/identity.rs:50–53  ·  view source on GitHub ↗

Create an identity ID from a public key.

(public_key: &PublicKey)

Source from the content-addressed store, hash-verified

48impl IdentityId {
49 /// Create an identity ID from a public key.
50 pub fn from_public_key(public_key: &PublicKey) -> Self {
51 let hash = blake3::hash(public_key.as_bytes());
52 IdentityId(*hash.as_bytes())
53 }
54
55 /// Create an identity ID from raw bytes.
56 pub fn from_bytes(bytes: [u8; 32]) -> Self {

Callers

nothing calls this directly

Calls 3

hashFunction · 0.85
IdentityIdClass · 0.85
as_bytesMethod · 0.45

Tested by

no test coverage detected