Create an identity ID from a public key.
(public_key: &PublicKey)
| 48 | impl 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 { |
nothing calls this directly
no test coverage detected