Struct indy_data_types::keys::EncodedVerKey
source · 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: KeyEncoding
Implementations§
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_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 copy 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 FromStr for EncodedVerKey
impl FromStr for EncodedVerKey
§type Err = ConversionError
type Err = ConversionError
The associated error which can be returned from parsing.
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§fn eq(&self, other: &EncodedVerKey) -> bool
fn eq(&self, other: &EncodedVerKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncodedVerKey
impl PartialOrd for EncodedVerKey
source§fn partial_cmp(&self, other: &EncodedVerKey) -> Option<Ordering>
fn partial_cmp(&self, other: &EncodedVerKey) -> Option<Ordering>
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 EncodedVerKey
impl Validatable for EncodedVerKey
source§impl Zeroize for EncodedVerKey
impl Zeroize for EncodedVerKey
impl Eq for EncodedVerKey
impl StructuralEq for EncodedVerKey
impl StructuralPartialEq for EncodedVerKey
Auto Trait Implementations§
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