aboutsummaryrefslogtreecommitdiff
path: root/src/unit/blowfish.unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/unit/blowfish.unit
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/unit/blowfish.unit')
-rw-r--r--src/unit/blowfish.unit44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/unit/blowfish.unit b/src/unit/blowfish.unit
index abab63d..1b4ca18 100644
--- a/src/unit/blowfish.unit
+++ b/src/unit/blowfish.unit
@@ -50,29 +50,29 @@ static const char *testdat[34][3] ={
50 50
51suite Blowfish 51suite Blowfish
52{ 52{
53 test standard 53 test standard
54 { 54 {
55 for( int j = 0; j < 34; j++ ) 55 for( int j = 0; j < 34; j++ )
56 { 56 {
57 Bu::MemBuf mb; 57 Bu::MemBuf mb;
58 Bu::BlowfishEcb bf( mb ); 58 Bu::BlowfishEcb bf( mb );
59 bf.setPassword( Bu::decodeStr<Bu::Hex>( testdat[j][0] ) ); 59 bf.setPassword( Bu::decodeStr<Bu::Hex>( testdat[j][0] ) );
60 bf.write( Bu::decodeStr<Bu::Hex>( testdat[j][1] ) ); 60 bf.write( Bu::decodeStr<Bu::Hex>( testdat[j][1] ) );
61 unitTest( 61 unitTest(
62 mb.getString() == Bu::decodeStr<Bu::Hex>( testdat[j][2] ) 62 mb.getString() == Bu::decodeStr<Bu::Hex>( testdat[j][2] )
63 ); 63 );
64 64
65 mb.setPos( 0 ); 65 mb.setPos( 0 );
66 Bu::BlowfishEcb bf2( mb ); 66 Bu::BlowfishEcb bf2( mb );
67 bf2.setPassword( Bu::decodeStr<Bu::Hex>( testdat[j][0] ) ); 67 bf2.setPassword( Bu::decodeStr<Bu::Hex>( testdat[j][0] ) );
68 char buf[8]; 68 char buf[8];
69 bf2.read( buf, 8 ); 69 bf2.read( buf, 8 );
70 70
71 unitTest( 71 unitTest(
72 Bu::String(testdat[j][1]) == 72 Bu::String(testdat[j][1]) ==
73 Bu::encodeStr<Bu::Hex>(Bu::String(buf,8),true) 73 Bu::encodeStr<Bu::Hex>(Bu::String(buf,8),true)
74 ); 74 );
75 } 75 }
76 } 76 }
77} 77}
78 78