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

Method from_base32

atomic-identity/src/signing.rs:78–84  ·  view source on GitHub ↗

Decode a signature from base32.

(s: &str)

Source from the content-addressed store, hash-verified

76
77 /// Decode a signature from base32.
78 pub fn from_base32(s: &str) -> Result<Self, IdentityError> {
79 let bytes = data_encoding::BASE32_NOPAD
80 .decode(s.as_bytes())
81 .map_err(|_| IdentityError::InvalidBase32)?;
82
83 Self::from_slice(&bytes)
84 }
85
86 /// Verify this signature against a message and public key.
87 pub fn verify(&self, message: &[u8], public_key: &PublicKey) -> Result<(), IdentityError> {

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.80
as_bytesMethod · 0.45

Tested by

no test coverage detected