pub struct RustCryptoRsaPrivateKey { /* private fields */ }Expand description
Opaque RSA private-key handle for the built-in RustCrypto provider.
Implementations§
Source§impl RustCryptoRsaPrivateKey
impl RustCryptoRsaPrivateKey
Sourcepub fn new(key: RsaPrivateKey) -> Self
pub fn new(key: RsaPrivateKey) -> Self
Wrap an already parsed RustCrypto RSA private key.
Trait Implementations§
Source§impl Clone for RustCryptoRsaPrivateKey
impl Clone for RustCryptoRsaPrivateKey
Source§impl From<RsaPrivateKey> for RustCryptoRsaPrivateKey
Available on crate feature xmlenc only.
impl From<RsaPrivateKey> for RustCryptoRsaPrivateKey
Available on crate feature
xmlenc only.Source§fn from(key: RsaPrivateKey) -> Self
fn from(key: RsaPrivateKey) -> Self
Converts to this type from the input type.
Source§impl KeyRecoveryKey for RustCryptoRsaPrivateKey
Available on crate feature xmlenc only.
impl KeyRecoveryKey for RustCryptoRsaPrivateKey
Available on crate feature
xmlenc only.Source§fn rsa_modulus_bits(&self) -> usize
fn rsa_modulus_bits(&self) -> usize
Exact mathematical bit length of the recovery key’s public modulus,
excluding leading zero padding. Not the rounded ciphertext width.
Source§fn rsa_public_exponent(&self) -> Option<u64>
fn rsa_public_exponent(&self) -> Option<u64>
Public exponent of that same key, or
None if wider than 64 bits.
Opaque providers expose public metadata without copying private material.Source§fn ciphertext_len(&self) -> usize
fn ciphertext_len(&self) -> usize
Exact RSA ciphertext width in bytes for the key used by
Self::recover_with_provider.Source§fn recover_with_provider(
&self,
provider: &dyn CryptoProvider,
parameters: &RsaOaepParameters,
ciphertext: &[u8],
) -> Result<Vec<u8>, ProviderError>
fn recover_with_provider( &self, provider: &dyn CryptoProvider, parameters: &RsaOaepParameters, ciphertext: &[u8], ) -> Result<Vec<u8>, ProviderError>
Execute OAEP recovery using the selected provider’s randomness.
Source§fn recover_content_with_provider(
&self,
provider: &dyn CryptoProvider,
parameters: &RsaOaepParameters,
_content_algorithm: DataEncryptionAlgorithm,
ciphertext: &[u8],
) -> Result<RecoveredContentKey, ProviderError>
fn recover_content_with_provider( &self, provider: &dyn CryptoProvider, parameters: &RsaOaepParameters, _content_algorithm: DataEncryptionAlgorithm, ciphertext: &[u8], ) -> Result<RecoveredContentKey, ProviderError>
Recover without exporting a CEK when supported by the execution domain.
Source§fn provider_name(&self) -> Option<&'static str>
fn provider_name(&self) -> Option<&'static str>
Native engine binding; an incompatible provider must reject this handle.
Source§fn public_spki(&self) -> Option<&[u8]>
fn public_spki(&self) -> Option<&[u8]>
Borrow the matching public SPKI when available for certificate binding.
Auto Trait Implementations§
impl Freeze for RustCryptoRsaPrivateKey
impl RefUnwindSafe for RustCryptoRsaPrivateKey
impl Send for RustCryptoRsaPrivateKey
impl Sync for RustCryptoRsaPrivateKey
impl Unpin for RustCryptoRsaPrivateKey
impl UnsafeUnpin for RustCryptoRsaPrivateKey
impl UnwindSafe for RustCryptoRsaPrivateKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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