Struct indy_data_types::keys::VerKey
source · pub struct VerKey {
pub key: Box<[u8]>,
pub alg: KeyType,
}
Expand description
A raw verkey used in verifying signatures
Fields§
§key: Box<[u8]>
§alg: KeyType
Implementations§
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 PartialEq for VerKey
impl PartialEq for VerKey
source§impl PartialOrd for VerKey
impl PartialOrd for VerKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Validatable for VerKey
impl Validatable for VerKey
impl Eq for VerKey
impl StructuralEq for VerKey
impl StructuralPartialEq for VerKey
Auto Trait Implementations§
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
source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)