Help for this page
#! /usr/bin/perl ... #$rsa_priv->use_md5_hash(); # use_sha1_hash is the default #$signature = $rsa_priv->sign($plaintext); #print "Signed correctly\n" if ($rsa->verify($plaintext, #$signature)) +;
my $rsa = Crypt::OpenSSL::RSA->generate_key(2048); # or my $rsa_priv = Crypt::OpenSSL::RSA->new_private_key($rsa->get_private_ +key_string() ); my $rsa_pub = Crypt::OpenSSL::RSA->new_public_key( $rsa->get_public_ke +y_string() ); my $ciphertext = $rsa_pub->encrypt($plaintext) ;