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

Method from_public_key

atomic-identity/src/identity.rs:56–59  ·  view source on GitHub ↗

Create an identity ID from a public key.

(public_key: &PublicKey)

Source from the content-addressed store, hash-verified

54impl IdentityId {
55 /// Create an identity ID from a public key.
56 pub fn from_public_key(public_key: &PublicKey) -> Self {
57 let hash = blake3::hash(public_key.as_bytes());
58 IdentityId(*hash.as_bytes())
59 }
60
61 /// Create an identity ID from raw bytes.
62 pub fn from_bytes(bytes: [u8; 32]) -> Self {

Callers

nothing calls this directly

Calls 3

IdentityIdClass · 0.85
hashFunction · 0.50
as_bytesMethod · 0.45

Tested by

no test coverage detected