Crypt::VERPString - Encrypt and encode fixed-length records for VERP
Version 0.02
use Crypt::VERPString; use MIME::Base64; my $cv = Crypt::VERPString->new( cipher => 'IDEA', # defaults to blowfish key => 'HAHGLUBHAL!@#$!%', # anything, really format => 'Na*', # defaults to a* separator => '!', # defaults to - encoder => \&MIME::Base64::encode_base64,# defaults to base32 decoder => \&MIME::Base64::decode_base64,# ditto ); my $iv = 31337; my $verp = $cv->encrypt($iv, 12345, 'hi i am a payload'); # $verp eq '00007a69!+BT8d1wzW12YSFP5v7AnKVipYZ8rkQIT'; # do stuff with this value, send to a friend... # oops, your friend doesn't exist, the message bounces and you # retrieve the envelope. my ($bouncedverp) = ($header =~ /(?:[0-9a-fA-F]{8}!.*)/); my ($number, $string) = $cv->decrypt($bouncedverp); # now you can do something with this info.
VERP stands for Variable Envelope Return Path. It is the act of inserting some sort of identifying string into the local part of the envelope address of an email, in order to match it to a distinct sending, should the message bounce. This module prepares a string suitable for travel in the deep jungle of SMTP, making it possible to store and retrieve unique envelope data from a bounced message.
This module is also useful for other small payloads that require the same kind of escaping.
The block cipher to use. Defaults to Blowfish.
The secret key.
The pack() format. Defaults to "a*".
The separation character between the initialization vector and the payload. Defaults to "-".
A Subroutine reference to encode the payload. Defaults to MIME::Base32::encode
A Subroutine reference to decode the payload. Defaults to MIME::Base32::decode
Pass in the list and retrieve the unique, encrypted VERP string.
Pass in the VERP string and retrieve the original unencrypted list.
dorian taylor, <dorian@cpan.org>
<dorian@cpan.org>
Crypt::CBC
MIME::Base32
http://cr.yp.to/proto/verp.txt
The true IV is just the given number and zero, packed into two network longs. I wouldn't recommend really using this for extremely sensitive data, I mean, it's initially designed to fit in the local-part of an email. Ideas and patches are welcome.
Please report any bugs or feature requests to bug-crypt-verpstring@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-crypt-verpstring@rt.cpan.org
Copyright 2005 iCrystal Software, Inc., All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Crypt::VERPString, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::VERPString
CPAN shell
perl -MCPAN -e shell install Crypt::VERPString
For more information on module installation, please visit the detailed CPAN module installation guide.