File: pcbc.t

package info (click to toggle)
libcrypt-rijndael-perl 1.08-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 220 kB
  • ctags: 69
  • sloc: ansic: 625; perl: 139; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl

use Cwd;
use File::Spec;
use Test::More 'no_plan';

require_ok( File::Spec->catfile( cwd(), qw( t lib mode.pl ) ) );

use_ok( 'Crypt::Rijndael' );

ok( defined &Crypt::Rijndael::MODE_PCBC );
diag( "MODE_PCBC is @{ [Crypt::Rijndael::MODE_PCBC()] }" ) if $ENV{DEBUG};

TODO: {
	local $TODO = "PCBC is not a legal mode (yet)";
	
my $value = eval {
	foreach my $a  ( 0 .. 10 ) 
		{
		my $hash = crypt_decrypt( Crypt::Rijndael::MODE_PCBC() );
		
		is( $hash->{plain}, $hash->{data}, "Decrypted text matches plain text" );
		}
	};

};