Struct fog_crypto::identity::Identity
source · pub struct Identity { /* private fields */ }
Expand description
An Identity, wrapping a public signing key.
This is useful as an identifier of who has created a given signature.
Implementations§
source§impl Identity
impl Identity
sourcepub fn raw_public_key(&self) -> &[u8] ⓘ
pub fn raw_public_key(&self) -> &[u8] ⓘ
Get the raw public signing key contained within.
sourcepub fn as_vec(&self) -> Vec<u8> ⓘ
pub fn as_vec(&self) -> Vec<u8> ⓘ
Convert into a byte vector. For extending an existing byte vector, see
encode_vec
.
sourcepub fn from_base58(s: &str) -> Result<Self, CryptoError>
pub fn from_base58(s: &str) -> Result<Self, CryptoError>
Attempt to parse a base58-encoded Identity.
sourcepub fn encode_vec(&self, buf: &mut Vec<u8>)
pub fn encode_vec(&self, buf: &mut Vec<u8>)
Encode onto an existing byte vector. Writes out the version followed by the public signing key. It does not include any length information in the encoding.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Identity> for Identity
impl PartialEq<Identity> for Identity
impl Eq for Identity
Auto Trait Implementations§
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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