pub struct RsaKey(/* private fields */);Expand description
RSA 签名密钥(PSS 与 PKCS#1 v1.5,按对端 offer 选择)。
Implementations§
Source§impl RsaKey
impl RsaKey
Sourcepub fn from_pkcs1_der(der: &[u8]) -> Result<Self, RustlsError>
pub fn from_pkcs1_der(der: &[u8]) -> Result<Self, RustlsError>
由 PKCS#1 RSAPrivateKey DER 构造(含结构一致性校验)。
Sourcepub fn from_pkcs8_der(der: &[u8]) -> Result<Self, RustlsError>
pub fn from_pkcs8_der(der: &[u8]) -> Result<Self, RustlsError>
由 PKCS#8 PrivateKeyInfo DER 构造。
Trait Implementations§
Source§impl SigningKey for RsaKey
impl SigningKey for RsaKey
Source§fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
Choose a
SignatureScheme from those offered. Read moreSource§fn algorithm(&self) -> SignatureAlgorithm
fn algorithm(&self) -> SignatureAlgorithm
What kind of key we have.
Source§fn public_key(&self) -> Option<SubjectPublicKeyInfoDer<'_>>
fn public_key(&self) -> Option<SubjectPublicKeyInfoDer<'_>>
Get the RFC 5280-compliant SubjectPublicKeyInfo (SPKI) of this
SigningKey if available.Auto Trait Implementations§
impl Freeze for RsaKey
impl RefUnwindSafe for RsaKey
impl Send for RsaKey
impl Sync for RsaKey
impl Unpin for RsaKey
impl UnsafeUnpin for RsaKey
impl UnwindSafe for RsaKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more