Trait PublicKeyData
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> ⓘ { ... }
}Available on crate feature
rustls and (crate features aws-lc or ring) only.Expand description
The public key data of a key pair
Required Methods§
fn algorithm(&self) -> &'static SignatureAlgorithm
fn algorithm(&self) -> &'static SignatureAlgorithm
The algorithm used by the key pair
Provided Methods§
fn subject_public_key_info(&self) -> Vec<u8> ⓘ
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl<K> PublicKeyData for &Kwhere
K: PublicKeyData + ?Sized,
impl<K> PublicKeyData for &Kwhere
K: PublicKeyData + ?Sized,
Implementors§
impl PublicKeyData for KeyPair
Available on crate feature
crypto only.