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> ⓘ { ... }
}展开描述
一个密钥对的公钥数据
必需方法§
Sourcefn algorithm(&self) -> &'static SignatureAlgorithm
fn algorithm(&self) -> &'static SignatureAlgorithm
该密钥对所使用的算法
提供方法§
Sourcefn subject_public_key_info(&self) -> Vec<u8> ⓘ
fn subject_public_key_info(&self) -> Vec<u8> ⓘ
DER 格式的公钥数据
该密钥依据 X.509 SubjectPublicKeyInfo 结构进行格式化。 参见 RFC 5280 §4.1。
外部类型的实现§
Source§impl<K: PublicKeyData + ?Sized> PublicKeyData for &K
impl<K: PublicKeyData + ?Sized> PublicKeyData for &K
实现者§
impl PublicKeyData for KeyPair
Available on crate feature
crypto only.