pub struct NotaryPublicKey {
pub algorithm: KeyAlgorithm,
pub key_bytes: Vec<u8>,
pub kid: Option<String>,
}Expand description
A notary public key recovered from a discovery mechanism.
Fields§
§algorithm: KeyAlgorithmAlgorithm this key must be used with.
key_bytes: Vec<u8>Raw public key bytes (32 for Ed25519, 33 compressed for P-256).
kid: Option<String>Key identifier, when the source supplied one. Matched against the
fragment of proof.verificationMethod to pick among several keys.
Implementations§
Source§impl NotaryPublicKey
impl NotaryPublicKey
Sourcepub fn to_ed25519(&self) -> Result<VerifyingKey, AphError>
pub fn to_ed25519(&self) -> Result<VerifyingKey, AphError>
Converts to an Ed25519 verifying key, or fails if this key is a different algorithm or not a valid curve point.
Trait Implementations§
Source§impl Clone for NotaryPublicKey
impl Clone for NotaryPublicKey
Source§fn clone(&self) -> NotaryPublicKey
fn clone(&self) -> NotaryPublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NotaryPublicKey
impl Debug for NotaryPublicKey
impl Eq for NotaryPublicKey
Source§impl PartialEq for NotaryPublicKey
impl PartialEq for NotaryPublicKey
impl StructuralPartialEq for NotaryPublicKey
Auto Trait Implementations§
impl Freeze for NotaryPublicKey
impl RefUnwindSafe for NotaryPublicKey
impl Send for NotaryPublicKey
impl Sync for NotaryPublicKey
impl Unpin for NotaryPublicKey
impl UnsafeUnpin for NotaryPublicKey
impl UnwindSafe for NotaryPublicKey
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