#!/bin/perl5 -w # $Id$ # # Yet another test of Chaffe. # This test relies on Compress::Zlib to work. Obviously, this # chaffing produces huge data sets. Here's one solution that slows # things down even more. use Chaffe; use Compress::Zlib; use strict; my $c = new Chaffe; $c->secret('this is a test'); my $str = "This is a test to chaffe. It's a whopping big message, I know."; my $str_c = $c->chaffe($str); print "Size of str_c = ", length $str_c, "\n"; my $str_c_z = compress($str_c); print "Size of str_c_z = ", length $str_c_z, "\n"; # Uncompress and winnow the message, just to be sure. print $c->winnow(uncompress($str_c_z)), "\n"; __END__