Verify a signature against a message
(&self, message: &[u8], signature: &[u8; 64])
| 42 | |
| 43 | /// Verify a signature against a message |
| 44 | pub fn verify(&self, message: &[u8], signature: &[u8; 64]) -> Result<(), IdentityError> { |
| 45 | let sig = Signature::from_bytes(signature); |
| 46 | self.0 |
| 47 | .verify(message, &sig) |
| 48 | .map_err(|e| IdentityError::VerificationFailed(e.to_string())) |
| 49 | } |
| 50 | |
| 51 | /// Encode the public key as base32 |
| 52 | pub fn to_base32(&self) -> String { |
no outgoing calls