pub struct Verfer { /* private fields */ }Expand description
Verfer is Matter subclass with method to verify signature of serialization using the .raw as verifier key and .code for signature cipher suite.
Implementations§
Source§impl Verfer
impl Verfer
Sourcepub fn from_qb64(qb64: &str) -> Result<Self, MatterError>
pub fn from_qb64(qb64: &str) -> Result<Self, MatterError>
Creates a new Verfer instance from a QB64-encoded string.
This method calls BaseMatter::from_qb64 and verifies the code is supported.
pub fn new(code: Option<&[u8]>, raw: Option<&str>) -> Result<Self, MatterError>
pub fn verify(&self, sig: &[u8], ser: &[u8]) -> Result<bool, MatterError>
Trait Implementations§
Source§impl Matter for Verfer
impl Matter for Verfer
Source§fn is_transferable(&self) -> bool
fn is_transferable(&self) -> bool
Returns whether the derivation code is transferable
Source§fn is_digestive(&self) -> bool
fn is_digestive(&self) -> bool
Returns whether the code represents a digest
Source§fn is_prefixive(&self) -> bool
fn is_prefixive(&self) -> bool
Returns whether the code represents a prefix
Source§fn is_special(&self) -> bool
fn is_special(&self) -> bool
Returns whether the code represents a prefix
fn as_any(&self) -> &dyn Any
Auto Trait Implementations§
impl Freeze for Verfer
impl RefUnwindSafe for Verfer
impl Send for Verfer
impl Sync for Verfer
impl Unpin for Verfer
impl UnsafeUnpin for Verfer
impl UnwindSafe for Verfer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more