diff --git a/openssl/src/rsa.rs b/openssl/src/rsa.rs index c96e21d8d747ad1c91c6b2c9ae90b857d57ee2ea..1ccce25087663554991bc3d4809e6bea02666f51 100644 --- a/openssl/src/rsa.rs +++ b/openssl/src/rsa.rs @@ -490,8 +490,18 @@ impl RsaPrivateKeyBuilder { impl Rsa { /// Creates a new RSA key with private components (public components are assumed). /// - /// This a convenience method over - /// `Rsa::build(n, e, d)?.set_factors(p, q)?.set_crt_params(dmp1, dmq1, iqmp)?.build()` + /// This a convenience method over: + /// ``` + /// # use openssl::rsa::RsaPrivateKeyBuilder; + /// # fn main() -> Result<(), Box> { + /// # let bn = || openssl::bn::BigNum::new().unwrap(); + /// # let (n, e, d, p, q, dmp1, dmq1, iqmp) = (bn(), bn(), bn(), bn(), bn(), bn(), bn(), bn()); + /// RsaPrivateKeyBuilder::new(n, e, d)? + /// .set_factors(p, q)? + /// .set_crt_params(dmp1, dmq1, iqmp)? + /// .build(); + /// # Ok(()) } + /// ``` #[allow(clippy::too_many_arguments, clippy::many_single_char_names)] pub fn from_private_components( n: BigNum,