my $private_key = $sth->fetchrow(); #Stored as a string #I need to put $private_key in a format readable by the function below my $plaintext = $rsa->decrypt ( Cyphertext => $cyphertext, Key => $private_key, Armour => 1, ) || die $rsa->errstr();