PerlIO::via::CBC - PerlIO layer for reading/writing CBC encrypted files
use PerlIO::via::CBC; PerlIO::via::CBC->config( 'key' => 'my secret key', 'cipher' => 'Blowfish', 'iv' => '$KJh#(}q', 'regenerate_key' => 0, # default true 'padding' => 'space', 'prepend_iv' => 0, 'pcbc' => 1 #default 0 ); my $fh; open($fh, '>:via(PerlIO::via::CBC)', $file) or die "Can't open $file for encryption: $!\n"; print $fh $lots_of_secret_data; close($fh) or die "Error closing file: $!\n"; open($fh, '<:via(PerlIO::via::CBC)', $file) or die "Can't open $file for decryption: $!\n"; print <$fh>; close($fh) or die "Error closing file: $!\n";
This module implements a PerlIO layer that can read and read CBC encrypted files. It uses Crypt::CBC to do the CBC. So check Crypt::CBC for more information.
Allows the configuration of the CBC. Check Crypt::CBC->new() for more information.
Crypt::CBC (any)
Sascha Kiefer, E<perl@intertivityNOSP4M.comE>, http://www.intertivity.com
Copyright (C) 2005 by Sascha Kiefer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.