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