Struct ipfs_embed::identity::ecdsa::PublicKey
pub struct PublicKey(_);
Expand description
An ECDSA public key.
Implementations§
§impl PublicKey
impl PublicKey
pub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
pub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
Verify an ECDSA signature on a message using the public key.
pub fn from_bytes(k: &[u8]) -> Result<PublicKey, DecodingError>
pub fn from_bytes(k: &[u8]) -> Result<PublicKey, DecodingError>
Decode a public key from a byte buffer without compression.
pub fn to_bytes(&self) -> Vec<u8, Global> ⓘ
pub fn to_bytes(&self) -> Vec<u8, Global> ⓘ
Encode a public key into a byte buffer without compression.
pub fn encode_der(&self) -> Vec<u8, Global> ⓘ
pub fn encode_der(&self) -> Vec<u8, Global> ⓘ
Encode a public key into a DER encoded byte buffer as defined by SEC1 standard.
pub fn decode_der(k: &[u8]) -> Result<PublicKey, DecodingError>
pub fn decode_der(k: &[u8]) -> Result<PublicKey, DecodingError>
Decode a public key into a DER encoded byte buffer as defined by SEC1 standard.
Trait Implementations§
§impl Ord for PublicKey
impl Ord for PublicKey
§impl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
§fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &PublicKey) -> 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 more