~ubuntu-branches/ubuntu/maverick/ciphersaber/maverick

« back to all changes in this revision

Viewing changes to t/both_long.t

  • Committer: Bazaar Package Importer
  • Author(s): Jerome Marant
  • Date: 2002-03-27 07:23:42 UTC
  • Revision ID: james.westby@ubuntu.com-20020327072342-zcvplihmsszct2ok
Tags: upstream-0.60
ImportĀ upstreamĀ versionĀ 0.60

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# encrypt and decrypt a line greater than 256 characters long
 
2
# this tests for a subtle bug, ie, missing a modulo on $i
 
3
 
 
4
use Crypt::CipherSaber;
 
5
 
 
6
print "1..1\n";
 
7
 
 
8
my $cs = new Crypt::CipherSaber ('first key');
 
9
my $long_line = join(' ', (1 .. 100));
 
10
my $coded = $cs->encrypt($long_line);
 
11
 
 
12
if ($long_line = $cs->decrypt($coded)) {
 
13
        print "ok 1\n";
 
14
} else {
 
15
        print "not ok 1\n";
 
16
}