2 // HMACRIPEMD160Test.cs - NUnit Test Cases for HMACRIPEMD160
3 // http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
6 // Sebastien Pouliot (sebastien@ximian.com)
8 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
9 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 using NUnit
.Framework
;
36 using System
.Security
.Cryptography
;
39 namespace MonoTests
.System
.Security
.Cryptography
{
42 public class HMACRIPEMD160Test
: Assertion
{
44 protected HMACRIPEMD160 hmac
;
46 // because most crypto stuff works with byte[] buffers
47 static public void AssertEquals (string msg
, byte[] array1
, byte[] array2
)
49 if ((array1
== null) && (array2
== null))
52 Fail (msg
+ " -> First array is NULL");
54 Fail (msg
+ " -> Second array is NULL");
56 bool a
= (array1
.Length
== array2
.Length
);
58 for (int i
= 0; i
< array1
.Length
; i
++) {
59 if (array1
[i
] != array2
[i
]) {
65 if (array1
.Length
> 0) {
66 msg
+= " -> Expected " + BitConverter
.ToString (array1
, 0);
67 msg
+= " is different than " + BitConverter
.ToString (array2
, 0);
75 hmac
= new HMACRIPEMD160 ();
78 static byte[] key1
= { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x01, 0x23, 0x45, 0x67 }
;
80 // HMACRIPEMD160 (key1, "") = cf387677bfda8483e63b57e06c3b5ecd8b7fc055
82 public void HMACRIPEMD160_Key1_Test1 ()
84 byte[] result
= { 0xcf, 0x38, 0x76, 0x77, 0xbf, 0xda, 0x84, 0x83, 0xe6, 0x3b, 0x57, 0xe0, 0x6c, 0x3b, 0x5e, 0xcd, 0x8b, 0x7f, 0xc0, 0x55 }
;
85 byte[] input
= new byte [0];
87 string testName
= "HMACRIPEMD160 Key #1 Test #1";
89 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
90 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
91 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
92 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
93 // N/A RIPEMD160_e (testName, hmac, input, result);
96 // HMACRIPEMD160 ("a") = 0d351d71b78e36dbb7391c810a0d2b6240ddbafc
98 public void HMACRIPEMD160_Key1_Test2 ()
100 byte[] result
= { 0x0d, 0x35, 0x1d, 0x71, 0xb7, 0x8e, 0x36, 0xdb, 0xb7, 0x39, 0x1c, 0x81, 0x0a, 0x0d, 0x2b, 0x62, 0x40, 0xdd, 0xba, 0xfc }
;
101 byte[] input
= Encoding
.Default
.GetBytes ("a");
103 string testName
= "HMACRIPEMD160 Key #1 Test #2";
105 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
106 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
107 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
108 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
109 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
112 // HMACRIPEMD160 ("abc") = f7ef288cb1bbcc6160d76507e0a3bbf712fb67d6
114 public void HMACRIPEMD160_Key1_Test3 ()
116 byte[] result
= { 0xf7, 0xef, 0x28, 0x8c, 0xb1, 0xbb, 0xcc, 0x61, 0x60, 0xd7, 0x65, 0x07, 0xe0, 0xa3, 0xbb, 0xf7, 0x12, 0xfb, 0x67, 0xd6 }
;
117 byte[] input
= Encoding
.Default
.GetBytes ("abc");
119 string testName
= "HMACRIPEMD160 Key #1 Test #3";
121 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
122 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
123 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
124 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
125 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
128 // RIPEMD160 ("message digest") = f83662cc8d339c227e600fcd636c57d2571b1c34
130 public void HMACRIPEMD160_Key1_Test4 ()
132 byte[] result
= { 0xf8, 0x36, 0x62, 0xcc, 0x8d, 0x33, 0x9c, 0x22, 0x7e, 0x60, 0x0f, 0xcd, 0x63, 0x6c, 0x57, 0xd2, 0x57, 0x1b, 0x1c, 0x34 }
;
133 byte[] input
= Encoding
.Default
.GetBytes ("message digest");
135 string testName
= "HMACRIPEMD160 Key #1 Test #4";
137 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
138 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
139 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
140 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
141 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
144 // RIPEMD160 ("abcdefghijklmnopqrstuvwxyz") = 843d1c4eb880ac8ac0c9c95696507957d0155ddb
146 public void HMACRIPEMD160_Key1_Test5 ()
148 byte[] result
= { 0x84, 0x3d, 0x1c, 0x4e, 0xb8, 0x80, 0xac, 0x8a, 0xc0, 0xc9, 0xc9, 0x56, 0x96, 0x50, 0x79, 0x57, 0xd0, 0x15, 0x5d, 0xdb }
;
149 byte[] input
= Encoding
.Default
.GetBytes ("abcdefghijklmnopqrstuvwxyz");
151 string testName
= "HMACRIPEMD160 Key #1 Test #5";
153 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
154 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
155 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
156 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
157 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
160 // RIPEMD160 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
161 // 60f5ef198a2dd5745545c1f0c47aa3fb5776f881
163 public void HMACRIPEMD160_Key1_Test6 ()
165 byte[] result
= { 0x60, 0xf5, 0xef, 0x19, 0x8a, 0x2d, 0xd5, 0x74, 0x55, 0x45, 0xc1, 0xf0, 0xc4, 0x7a, 0xa3, 0xfb, 0x57, 0x76, 0xf8, 0x81 }
;
166 byte[] input
= Encoding
.Default
.GetBytes ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq");
168 string testName
= "HMACRIPEMD160 Key #1 Test #6";
170 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
171 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
172 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
173 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
174 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
177 // RIPEMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
178 // b0e20b6e3116640286ed3a87a5713079b21f5189
180 public void HMACRIPEMD160_Key1_Test7 ()
182 byte[] result
= { 0xe4, 0x9c, 0x13, 0x6a, 0x9e, 0x56, 0x27, 0xe0, 0x68, 0x1b, 0x80, 0x8a, 0x3b, 0x97, 0xe6, 0xa6, 0xe6, 0x61, 0xae, 0x79 }
;
183 byte[] input
= Encoding
.Default
.GetBytes ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
185 string testName
= "HMACRIPEMD160 Key #1 Test #7";
187 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
188 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
189 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
190 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
191 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
194 // RIPEMD160 ("123456789012345678901234567890123456789012345678901234567890123456
195 // 78901234567890") = 9b752e45573d4b39f4dbd3323cab82bf63326bfb
197 public void HMACRIPEMD160_Key1_Test8 ()
199 byte[] result
= { 0x31, 0xbe, 0x3c, 0xc9, 0x8c, 0xee, 0x37, 0xb7, 0x9b, 0x06, 0x19, 0xe3, 0xe1, 0xc2, 0xbe, 0x4f, 0x1a, 0xa5, 0x6e, 0x6c }
;
200 byte[] input
= Encoding
.Default
.GetBytes ("12345678901234567890123456789012345678901234567890123456789012345678901234567890");
202 string testName
= "HMACRIPEMD160 Key #1 Test #8";
204 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
205 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
206 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
207 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
208 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
211 // RIPEMD160 (1000000 x 'a') = 52783243c1697bdbe16d37f97f68f08325dc1528
213 public void HMACRIPEMD160_Key1_Test9 ()
215 byte[] result
= { 0xc2, 0xaa, 0x88, 0xc6, 0x40, 0x56, 0x58, 0xdc, 0x22, 0x5e, 0x48, 0x54, 0x88, 0x37, 0x1f, 0xb2, 0x43, 0x3f, 0xa7, 0x35 }
;
216 byte[] input
= new byte [1000000];
217 for (int i
= 0; i
< 1000000; i
++)
218 input
[i
] = 0x61; // a
220 string testName
= "HMACRIPEMD160 Key #1 Test #9";
222 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
223 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
224 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
225 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
226 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
229 static byte[] key2
= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 0x00, 0x11, 0x22, 0x33 }
;
231 // HMACRIPEMD160 (key2, "") = fe69a66c7423eea9c8fa2eff8d9dafb4f17a62f5
233 public void HMACRIPEMD160_Key2_Test1 ()
235 byte[] result
= { 0xfe, 0x69, 0xa6, 0x6c, 0x74, 0x23, 0xee, 0xa9, 0xc8, 0xfa, 0x2e, 0xff, 0x8d, 0x9d, 0xaf, 0xb4, 0xf1, 0x7a, 0x62, 0xf5 }
;
236 byte[] input
= new byte [0];
238 string testName
= "HMACRIPEMD160 Key #2 Test #1";
240 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
241 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
242 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
243 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
244 // N/A RIPEMD160_e (testName, hmac, input, result);
247 // HMACRIPEMD160 ("a") = 85743e899bc82dbfa36faaa7a25b7cfd372432cd
249 public void HMACRIPEMD160_Key2_Test2 ()
251 byte[] result
= { 0x85, 0x74, 0x3e, 0x89, 0x9b, 0xc8, 0x2d, 0xbf, 0xa3, 0x6f, 0xaa, 0xa7, 0xa2, 0x5b, 0x7c, 0xfd, 0x37, 0x24, 0x32, 0xcd }
;
252 byte[] input
= Encoding
.Default
.GetBytes ("a");
254 string testName
= "HMACRIPEMD160 Key #2 Test #2";
256 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
257 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
258 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
259 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
260 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
263 // HMACRIPEMD160 ("abc") = 6e4afd501fa6b4a1823ca3b10bd9aa0ba97ba182
265 public void HMACRIPEMD160_Key2_Test3 ()
267 byte[] result
= { 0x6e, 0x4a, 0xfd, 0x50, 0x1f, 0xa6, 0xb4, 0xa1, 0x82, 0x3c, 0xa3, 0xb1, 0x0b, 0xd9, 0xaa, 0x0b, 0xa9, 0x7b, 0xa1, 0x82 }
;
268 byte[] input
= Encoding
.Default
.GetBytes ("abc");
270 string testName
= "HMACRIPEMD160 Key #2 Test #3";
272 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
273 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
274 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
275 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
276 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
279 // RIPEMD160 ("message digest") = 2e066e624badb76a184c8f90fba053330e650e92
281 public void HMACRIPEMD160_Key2_Test4 ()
283 byte[] result
= { 0x2e, 0x06, 0x6e, 0x62, 0x4b, 0xad, 0xb7, 0x6a, 0x18, 0x4c, 0x8f, 0x90, 0xfb, 0xa0, 0x53, 0x33, 0x0e, 0x65, 0x0e, 0x92 }
;
284 byte[] input
= Encoding
.Default
.GetBytes ("message digest");
286 string testName
= "HMACRIPEMD160 Key #2 Test #4";
288 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
289 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
290 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
291 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
292 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
295 // RIPEMD160 ("abcdefghijklmnopqrstuvwxyz") = 07e942aa4e3cd7c04dedc1d46e2e8cc4c741b3d9
297 public void HMACRIPEMD160_Key2_Test5 ()
299 byte[] result
= { 0x07, 0xe9, 0x42, 0xaa, 0x4e, 0x3c, 0xd7, 0xc0, 0x4d, 0xed, 0xc1, 0xd4, 0x6e, 0x2e, 0x8c, 0xc4, 0xc7, 0x41, 0xb3, 0xd9 }
;
300 byte[] input
= Encoding
.Default
.GetBytes ("abcdefghijklmnopqrstuvwxyz");
302 string testName
= "HMACRIPEMD160 Key #2 Test #5";
304 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
305 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
306 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
307 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
308 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
311 // RIPEMD160 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
312 // b6582318ddcfb67a53a67d676b8ad869aded629a
314 public void HMACRIPEMD160_Key2_Test6 ()
316 byte[] result
= { 0xb6, 0x58, 0x23, 0x18, 0xdd, 0xcf, 0xb6, 0x7a, 0x53, 0xa6, 0x7d, 0x67, 0x6b, 0x8a, 0xd8, 0x69, 0xad, 0xed, 0x62, 0x9a }
;
317 byte[] input
= Encoding
.Default
.GetBytes ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq");
319 string testName
= "HMACRIPEMD160 Key #2 Test #6";
321 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
322 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
323 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
324 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
325 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
328 // RIPEMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
329 // f1be3ee877703140d34f97ea1ab3a07c141333e2
331 public void HMACRIPEMD160_Key2_Test7 ()
333 byte[] result
= { 0xf1, 0xbe, 0x3e, 0xe8, 0x77, 0x70, 0x31, 0x40, 0xd3, 0x4f, 0x97, 0xea, 0x1a, 0xb3, 0xa0, 0x7c, 0x14, 0x13, 0x33, 0xe2 }
;
334 byte[] input
= Encoding
.Default
.GetBytes ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
336 string testName
= "HMACRIPEMD160 Key #2 Test #7";
338 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
339 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
340 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
341 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
342 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
345 // RIPEMD160 ("123456789012345678901234567890123456789012345678901234567890123456
346 // 78901234567890") = 85f164703e61a63131be7e45958e0794123904f9
348 public void HMACRIPEMD160_Key2_Test8 ()
350 byte[] result
= { 0x85, 0xf1, 0x64, 0x70, 0x3e, 0x61, 0xa6, 0x31, 0x31, 0xbe, 0x7e, 0x45, 0x95, 0x8e, 0x07, 0x94, 0x12, 0x39, 0x04, 0xf9 }
;
351 byte[] input
= Encoding
.Default
.GetBytes ("12345678901234567890123456789012345678901234567890123456789012345678901234567890");
353 string testName
= "HMACRIPEMD160 Key #2 Test #8";
355 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
356 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
357 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
358 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
359 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
362 // RIPEMD160 (1000000 x 'a') = 82a504a002ba6e6c67f3cd67cedb66dc169bab7a
364 public void HMACRIPEMD160_Key2_Test9 ()
366 byte[] result
= { 0x82, 0xa5, 0x04, 0xa0, 0x02, 0xba, 0x6e, 0x6c, 0x67, 0xf3, 0xcd, 0x67, 0xce, 0xdb, 0x66, 0xdc, 0x16, 0x9b, 0xab, 0x7a }
;
367 byte[] input
= new byte [1000000];
368 for (int i
= 0; i
< 1000000; i
++)
369 input
[i
] = 0x61; // a
371 string testName
= "HMACRIPEMD160 Key #2 Test #9";
373 HMACRIPEMD160_a (testName
, hmac
, input
, result
);
374 HMACRIPEMD160_b (testName
, hmac
, input
, result
);
375 HMACRIPEMD160_c (testName
, hmac
, input
, result
);
376 HMACRIPEMD160_d (testName
, hmac
, input
, result
);
377 HMACRIPEMD160_e (testName
, hmac
, input
, result
);
380 public void HMACRIPEMD160_a (string testName
, HMACRIPEMD160 hmac
, byte[] input
, byte[] result
)
382 byte[] output
= hmac
.ComputeHash (input
);
383 AssertEquals (testName
+ ".a.1", result
, output
);
384 AssertEquals (testName
+ ".a.2", result
, hmac
.Hash
);
385 // required or next operation will still return old hash
389 public void HMACRIPEMD160_b (string testName
, HMACRIPEMD160 hmac
, byte[] input
, byte[] result
)
391 byte[] output
= hmac
.ComputeHash (input
, 0, input
.Length
);
392 AssertEquals (testName
+ ".b.1", result
, output
);
393 AssertEquals (testName
+ ".b.2", result
, hmac
.Hash
);
394 // required or next operation will still return old hash
398 public void HMACRIPEMD160_c (string testName
, HMACRIPEMD160 hmac
, byte[] input
, byte[] result
)
400 MemoryStream ms
= new MemoryStream (input
);
401 byte[] output
= hmac
.ComputeHash (ms
);
402 AssertEquals (testName
+ ".c.1", result
, output
);
403 AssertEquals (testName
+ ".c.2", result
, hmac
.Hash
);
404 // required or next operation will still return old hash
408 public void HMACRIPEMD160_d (string testName
, HMACRIPEMD160 hmac
, byte[] input
, byte[] result
)
410 hmac
.TransformFinalBlock (input
, 0, input
.Length
);
411 AssertEquals (testName
+ ".d", result
, hmac
.Hash
);
412 // required or next operation will still return old hash
416 public void HMACRIPEMD160_e (string testName
, HMACRIPEMD160 hmac
, byte[] input
, byte[] result
)
418 byte[] copy
= new byte [input
.Length
];
419 for (int i
=0; i
< input
.Length
- 1; i
++)
420 hmac
.TransformBlock (input
, i
, 1, copy
, i
);
421 hmac
.TransformFinalBlock (input
, input
.Length
- 1, 1);
422 AssertEquals (testName
+ ".e", result
, hmac
.Hash
);
423 // required or next operation will still return old hash
427 // none of those values changes for any implementation of RIPEMD160
429 public virtual void StaticInfo ()
431 string className
= hmac
.ToString ();
432 AssertEquals (className
+ ".HashSize", 160, hmac
.HashSize
);
433 AssertEquals (className
+ ".InputBlockSize", 1, hmac
.InputBlockSize
);
434 AssertEquals (className
+ ".OutputBlockSize", 1, hmac
.OutputBlockSize
);