VerifyingKey

Trait VerifyingKey 

Source
pub trait VerifyingKey {
    // Required methods
    fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool;
    fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool;
    fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool;
    fn x(&self) -> Vec<u8> ;
    fn y(&self) -> Vec<u8> ;
    fn curve_oid(&self) -> ObjectIdentifier;
    fn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>
       where Self: Sized;
    fn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>
       where Self: Sized;
    fn from_spki_der(der: &[u8]) -> Option<Self>
       where Self: Sized;
}
Expand description

A verifying key using ECDSA

Required Methods§

Source

fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-256 digest

Source

fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-384 digest

Source

fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-512 digest

Source

fn x(&self) -> Vec<u8>

Get the x coordinate bytes.

Source

fn y(&self) -> Vec<u8>

Get the y coordinate bytes.

Source

fn curve_oid(&self) -> ObjectIdentifier

Get the object identifier of the curve.

Source

fn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>
where Self: Sized,

Create a verifying key from the coordinates.

Source

fn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>
where Self: Sized,

Create a verifying key from the sec1 encoded coordinates

Source

fn from_spki_der(der: &[u8]) -> Option<Self>
where Self: Sized,

Create a new key from a subject public key info der.

Implementations on Foreign Types§

Source§

impl<C> VerifyingKey for VerifyingKey<C>

Source§

fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-256 digest

Source§

fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-384 digest

Source§

fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool

Verify the message using the SHA-512 digest

Source§

fn x(&self) -> Vec<u8>

Source§

fn y(&self) -> Vec<u8>

Source§

fn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>
where Self: Sized,

Source§

fn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>
where Self: Sized,

Source§

fn from_spki_der(der: &[u8]) -> Option<Self>
where Self: Sized,

Source§

fn curve_oid(&self) -> ObjectIdentifier

Implementors§