File: multi.t

package info (click to toggle)
libcrypt-simple-perl 0.06-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 84 kB
  • sloc: perl: 224; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -w
use strict;
use Test;

plan tests => 6;

use Crypt::Simple;

my @plain = qw/this is a test/;
my $ciphertext = encrypt(@plain);

ok($ciphertext);

my @out = decrypt($ciphertext);
ok(scalar @plain == scalar @out);
for (my $i=0; $i<@plain; ++$i) {
	ok($plain[$i] eq $out[$i]);
}