跳到主要内容

PublicKeyData

搜索

特性 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>  { ... }
}
展开描述

一个密钥对的公钥数据

必需方法§

Source

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

DER 格式的公钥

Source

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

该密钥对所使用的算法

提供方法§

Source

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

DER 格式的公钥数据

该密钥依据 X.509 SubjectPublicKeyInfo 结构进行格式化。 参见 RFC 5280 §4.1

外部类型的实现§

Source§

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

Source§

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

Source§

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

实现者§

Source§

impl PublicKeyData for KeyPair

Available on crate feature crypto only.
Source§

impl PublicKeyData for PublicKey

Source§

impl PublicKeyData for SubjectPublicKeyInfo