in reply to AES support for Crypt::OpenSSL::RSA?

I think that Convert::PEM can do what you're looking for. See the code snippet below borrowed from stuff-things.net Use the return value from decryptPEM($file,$password); as the value of your $key_string variable in your code.
# # borrowed from # http://stuff-things.net # use Convert::PEM; sub decryptPEM { my ($file,$password) = @_; my $pem = Convert::PEM->new( Name => 'RSA PRIVATE KEY', ASN => qq( RSAPrivateKey SEQUENCE { version INTEGER, n INTEGER, e INTEGER, d INTEGER, p INTEGER, q INTEGER, dp INTEGER, dq INTEGER, iqmp INTEGER } )); my $pkey = $pem->read(Filename => $file, Password => $password); return(undef) unless ($pkey); # Decrypt failed. $pem->encode(Content => $pkey); }

Replies are listed 'Best First'.
Re^2: AES support for Crypt::OpenSSL::RSA?
by Zippy1970 (Novice) on Feb 04, 2014 at 10:28 UTC

    Re: Convert::PEM

    I had found that code too but for some reason it always returned undef (Decrypt failed).