We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ae85c1 commit 98ed2caCopy full SHA for 98ed2ca
src/key.rs
@@ -465,6 +465,13 @@ impl RsaPrivateKey {
465
Self::from_components(n.get(), public_exponent, d, primes)
466
}
467
468
+ /// Get the public key from the private key.
469
+ ///
470
+ /// Specific alternative to [`AsRef::as_ref`].
471
+ pub fn as_public_key(&self) -> &RsaPublicKey {
472
+ &self.pubkey_components
473
+ }
474
+
475
/// Get the public key from the private key, cloning `n` and `e`.
476
///
477
/// Generally this is not needed since `RsaPrivateKey` implements the `PublicKey` trait,
0 commit comments