pub struct VerKey {
pub key: Vec<u8>,
pub alg: KeyType,
}Expand description
A raw verkey used in verifying signatures
Fields§
§key: Vec<u8>§alg: KeyTypeImplementations§
Source§impl VerKey
impl VerKey
pub fn new<K: AsRef<[u8]>>(key: K, alg: Option<KeyType>) -> Self
pub fn as_base58(&self) -> Result<EncodedVerKey, ConversionError>
pub fn encode( &self, enc: &KeyEncoding, ) -> Result<EncodedVerKey, ConversionError>
pub fn key_bytes(&self) -> Vec<u8> ⓘ
pub fn key_exchange(&self) -> Result<Self, ConversionError>
pub fn verify_signature<M: AsRef<[u8]>, S: AsRef<[u8]>>( &self, message: M, signature: S, ) -> Result<bool, ConversionError>
Trait Implementations§
Source§impl Ord for VerKey
impl Ord for VerKey
Source§impl PartialOrd for VerKey
impl PartialOrd for VerKey
Source§impl Validatable for VerKey
impl Validatable for VerKey
impl Eq for VerKey
impl StructuralPartialEq for VerKey
Auto Trait Implementations§
impl Freeze for VerKey
impl RefUnwindSafe for VerKey
impl Send for VerKey
impl Sync for VerKey
impl Unpin for VerKey
impl UnwindSafe for VerKey
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