Acme-Enc
view release on metacpan or search on metacpan
=head1 OPTIONS
use Acme::Enc qw(cyphertext 1);
use Acme::Enc qw(cyphertext);
use Acme::Enc qw(\&get_cyphertext 1);
use Acme::Enc qw(\&get_cyphertext);
This lets you specify the cyphertext or a code reference that returns a cyphertext to use to [de|en]crypt the source.
If a second argument is true then it uses ASCII Armour.
The code reference has $0 as its only argument so you could use that in cypher fetching. (IE based on a database or algorythm)
Note that to have it call your funtion to unencrypt it you must specify it as a string '\&foo' in main:: or else the return value of your function will be used:
use Digest::MD5 qw(md5_hex);
sub get_cyphertext { return md5_hex(shift()) }
use Acme::Enc qw(\&get_cyphertext);
[ your code here ]
( run in 1.667 second using v1.01-cache-2.11-cpan-39bf76dae61 )