ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/OpenSSL/t/03_Cipher.t
Revision: 1.1
Committed: Sat Oct 27 01:53:25 2001 UTC (24 years, 11 months ago) by stefan
Content type: application/x-troff
Branch: MAIN
CVS Tags: BEFORE_5_8_REGEX_FIX, HEAD
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 stefan 1.1
2     use Test;
3     BEGIN { plan tests => 2 };
4     use OpenSSL::Cipher;
5     ok(1);
6    
7     $unenc = "x"x9;
8    
9     $ctx = new_encrypt OpenSSL::Cipher("des-ecb", "xxxxxxxx");
10     $enc .= $ctx->update($unenc) for(0..9);
11     $enc .= $ctx->final;
12    
13     $ctx = new_decrypt OpenSSL::Cipher("des-ecb", "xxxxxxxx");
14     $dec .= $ctx->update($enc);
15     $dec .= $ctx->final;
16    
17     ok(($dec eq "x"x90) ? 1 : 0);
18