pub struct EncodedVerKey {
pub key: String,
pub alg: KeyType,
pub enc: KeyEncoding,
}Expand description
An encoded verkey appropriate for storing and transmitting
Fields§
§key: String§alg: KeyType§enc: KeyEncodingImplementations§
Source§impl EncodedVerKey
impl EncodedVerKey
pub fn new<K: AsRef<str>>( key: K, alg: Option<KeyType>, enc: Option<KeyEncoding>, ) -> Self
pub fn from_did_and_verkey( did: &str, key: &str, ) -> Result<Self, ConversionError>
pub fn abbreviated_for_did(&self, did: &str) -> Result<String, ConversionError>
pub fn decode(&self) -> Result<VerKey, ConversionError>
pub fn from_slice<K: AsRef<[u8]>>(key: K) -> Result<Self, ConversionError>
pub fn from_str(key: &str) -> Result<Self, ConversionError>
pub fn from_str_qualified( key: &str, dest: Option<&str>, alg: Option<KeyType>, enc: Option<KeyEncoding>, ) -> Result<Self, ConversionError>
pub fn long_form(&self) -> String
pub fn as_base58(self) -> Result<Self, ConversionError>
pub fn key_bytes(&self) -> Result<Vec<u8>, ConversionError>
pub fn encoded_key_bytes(&self) -> &[u8] ⓘ
pub fn key_exchange(&self) -> Result<VerKey, ConversionError>
pub fn key_exchange_encoded(&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 Clone for EncodedVerKey
impl Clone for EncodedVerKey
Source§fn clone(&self) -> EncodedVerKey
fn clone(&self) -> EncodedVerKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncodedVerKey
impl Debug for EncodedVerKey
Source§impl Display for EncodedVerKey
impl Display for EncodedVerKey
Source§impl Drop for EncodedVerKey
impl Drop for EncodedVerKey
Source§impl Hash for EncodedVerKey
impl Hash for EncodedVerKey
Source§impl Ord for EncodedVerKey
impl Ord for EncodedVerKey
Source§fn cmp(&self, other: &EncodedVerKey) -> Ordering
fn cmp(&self, other: &EncodedVerKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EncodedVerKey
impl PartialEq for EncodedVerKey
Source§impl PartialOrd for EncodedVerKey
impl PartialOrd for EncodedVerKey
Source§impl Validatable for EncodedVerKey
impl Validatable for EncodedVerKey
Source§impl Zeroize for EncodedVerKey
impl Zeroize for EncodedVerKey
impl Eq for EncodedVerKey
impl StructuralPartialEq for EncodedVerKey
Auto Trait Implementations§
impl Freeze for EncodedVerKey
impl RefUnwindSafe for EncodedVerKey
impl Send for EncodedVerKey
impl Sync for EncodedVerKey
impl Unpin for EncodedVerKey
impl UnwindSafe for EncodedVerKey
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