pub enum SigningPublicKey {
Ed25519(VerifyingKey),
P256(EncodedPoint, VerifyingKey),
DsaSha1(DsaPublicKey),
}Expand description
Signing public key.
Variants§
Ed25519(VerifyingKey)
EdDSA.
P256(EncodedPoint, VerifyingKey)
ECDSA-SHA256-P256
DsaSha1(DsaPublicKey)
DSA-SHA1.
Implementations§
Source§impl SigningPublicKey
impl SigningPublicKey
Sourcepub fn from_bytes(key: &[u8; 32]) -> Option<Self>
pub fn from_bytes(key: &[u8; 32]) -> Option<Self>
Create signing public key from bytes.
Sourcepub fn p256(data: &[u8]) -> Option<Self>
pub fn p256(data: &[u8]) -> Option<Self>
Attempt to construct SigningPublicKey::P256 from data.
Sourcepub fn dsa_sha1(data: &[u8]) -> Option<Self>
pub fn dsa_sha1(data: &[u8]) -> Option<Self>
Attempt to construct SigningPublicKey::P256 from data.
Sourcepub fn verify(&self, message: &[u8], signature: &[u8]) -> Result<()>
pub fn verify(&self, message: &[u8], signature: &[u8]) -> Result<()>
Verify signature of message.
Sourcepub fn signature_len(&self) -> usize
pub fn signature_len(&self) -> usize
Get signature length.
Trait Implementations§
Source§impl AsRef<[u8]> for SigningPublicKey
impl AsRef<[u8]> for SigningPublicKey
Source§impl Clone for SigningPublicKey
impl Clone for SigningPublicKey
Source§fn clone(&self) -> SigningPublicKey
fn clone(&self) -> SigningPublicKey
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 SigningPublicKey
impl Debug for SigningPublicKey
Source§impl PartialEq for SigningPublicKey
impl PartialEq for SigningPublicKey
impl Eq for SigningPublicKey
impl StructuralPartialEq for SigningPublicKey
Auto Trait Implementations§
impl Freeze for SigningPublicKey
impl RefUnwindSafe for SigningPublicKey
impl Send for SigningPublicKey
impl Sync for SigningPublicKey
impl Unpin for SigningPublicKey
impl UnwindSafe for SigningPublicKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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)