PerlIO-via-CBC
view release on metacpan or search on metacpan
lib/PerlIO/via/CBC.pm view on Meta::CPAN
}
1;
__END__
=head1 NAME
PerlIO::via::CBC - PerlIO layer for reading/writing CBC encrypted files
=head1 SYNOPSIS
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";
=head1 DESCRIPTION
This module implements a PerlIO layer that can read and read CBC encrypted files.
It uses L<Crypt::CBC> to do the CBC. So check L<Crypt::CBC> for more information.
=head2 config(%args)
Allows the configuration of the CBC. Check L<Crypt::CBC>->new() for more information.
=head1 OVERRIDEN METHODS
This section lists the overriden PerlIO::via methods.
=head2 FILL
=head2 FLUSH
=head2 PUSHED
=head1 REQUIRED MODULES
Crypt::CBC' => 2.12
Crypt::DES' => 2.03
=head1 SEE ALSO
L<PerlIO::via>
=head1 AUTHOR
Sascha Kiefer, C<esskar@cpan.org>
=head1 COPYRIGHT
This program is free software, you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
( run in 0.718 second using v1.01-cache-2.11-cpan-98e64b0badf )