/// Generates an RSA engine and signer out of test-only data.
Generates an RSA engine and signer out of test-only data.
Generates an RSA engine and signer out of test - only data .
pub fn rsa() -> (ring::rsa::Verify256, ring::rsa::Sign256) {
    let keypair = ring::rsa::KeyPair::from_pkcs8(RSA_2048_PRIV_PKCS8).unwrap();
    let pub_key = keypair.public();
    let rsa_builder = ring::rsa::Builder::new();
    let rsa = rsa_builder.new_verifier(pub_key).unwrap();
    let signer = rsa_builder.new_signer(keypair).unwrap();
    (rsa, signer)
}
pub fn rsa ( ) -> ( ring :: rsa :: Verify256 , ring :: rsa :: Sign256 ) { let keypair = ring :: rsa :: KeyPair :: from_pkcs8 ( RSA_2048_PRIV_PKCS8 ) . unwrap ( ) ; let pub_key = keypair . public ( ) ; let rsa_builder = ring :: rsa :: Builder :: new ( ) ; let rsa = rsa_builder . new_verifier ( pub_key ) . unwrap ( ) ; let signer = rsa_builder . new_signer ( keypair ) . unwrap ( ) ; ( rsa , signer ) }
Generates an RSA engine and signer out of test-only data.
Generates an RSA engine and signer out of test - only data .