PublicKeyData

Trait PublicKeyData 

Source
pub trait PublicKeyData {
    // Required methods
    fn der_bytes(&self) -> &[u8] ;
    fn algorithm(&self) -> &'static SignatureAlgorithm;

    // Provided method
    fn subject_public_key_info(&self) -> Vec<u8>  { ... }
}
Expand description

The public key data of a key pair

Required Methods§

Source

fn der_bytes(&self) -> &[u8]

The public key in DER format

Source

fn algorithm(&self) -> &'static SignatureAlgorithm

The algorithm used by the key pair

Provided Methods§

Source

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

The public key data in DER format

The key is formatted according to the X.509 SubjectPublicKeyInfo struct. See RFC 5280 section 4.1.

Implementations on Foreign Types§

Source§

impl<K: PublicKeyData + ?Sized> PublicKeyData for &K

Source§

fn der_bytes(&self) -> &[u8]

Source§

fn algorithm(&self) -> &'static SignatureAlgorithm

Implementors§

Source§

impl PublicKeyData for KeyPair

Available on crate feature crypto only.
Source§

impl PublicKeyData for PublicKey

Source§

impl PublicKeyData for SubjectPublicKeyInfo