2 * Unit tests for SystemFunctionXXX (LMHash?)
4 * Copyright 2004 Hans Leidekker
5 * Copyright 2006 Mike McCormack
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 unsigned char *Buffer
;
30 typedef int (WINAPI
*descrypt
)(unsigned char *, unsigned char *, unsigned char *);
31 static NTSTATUS (WINAPI
*pSystemFunction001
)(const BYTE
*, const BYTE
*, LPBYTE
);
32 static NTSTATUS (WINAPI
*pSystemFunction002
)(const BYTE
*, const BYTE
*, LPBYTE
);
33 static NTSTATUS (WINAPI
*pSystemFunction003
)(const BYTE
*, LPBYTE
);
34 static NTSTATUS (WINAPI
*pSystemFunction004
)(const struct ustring
*, const struct ustring
*, struct ustring
*);
35 static NTSTATUS (WINAPI
*pSystemFunction005
)(const struct ustring
*, const struct ustring
*, struct ustring
*);
36 static VOID (WINAPI
*pSystemFunction006
)( PCSTR passwd
, PSTR lmhash
);
37 static NTSTATUS (WINAPI
*pSystemFunction008
)(const BYTE
*, const BYTE
*, LPBYTE
);
38 static NTSTATUS (WINAPI
*pSystemFunction009
)(const BYTE
*, const BYTE
*, LPBYTE
);
39 static NTSTATUS (WINAPI
*pSystemFunction032
)(struct ustring
*, const struct ustring
*);
41 /* encrypt two blocks */
42 static descrypt pSystemFunction012
;
43 static descrypt pSystemFunction014
;
44 static descrypt pSystemFunction016
;
45 static descrypt pSystemFunction018
;
46 static descrypt pSystemFunction020
;
47 static descrypt pSystemFunction022
;
49 /* decrypt two blocks */
50 static descrypt pSystemFunction013
;
51 static descrypt pSystemFunction015
;
52 static descrypt pSystemFunction017
;
53 static descrypt pSystemFunction019
;
54 static descrypt pSystemFunction021
;
55 static descrypt pSystemFunction023
;
57 /* encrypt two blocks with a 32bit key */
58 static descrypt pSystemFunction024
;
59 static descrypt pSystemFunction025
;
61 /* decrypt two blocks with a 32bit key */
62 static descrypt pSystemFunction026
;
63 static descrypt pSystemFunction027
;
65 typedef int (WINAPI
*memcmpfunc
)(unsigned char *, unsigned char *);
66 static memcmpfunc pSystemFunction030
;
67 static memcmpfunc pSystemFunction031
;
69 static void test_SystemFunction006(void)
73 char passwd
[] = { 's','e','c','r','e','t', 0, 0, 0, 0, 0, 0, 0, 0 };
74 unsigned char expect
[] =
75 { 0x85, 0xf5, 0x28, 0x9f, 0x09, 0xdc, 0xa7, 0xeb,
76 0xaa, 0xd3, 0xb4, 0x35, 0xb5, 0x14, 0x04, 0xee };
78 pSystemFunction006( passwd
, lmhash
);
80 ok( !memcmp( lmhash
, expect
, sizeof(expect
) ),
81 "lmhash: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
82 lmhash
[0], lmhash
[1], lmhash
[2], lmhash
[3], lmhash
[4], lmhash
[5],
83 lmhash
[6], lmhash
[7], lmhash
[8], lmhash
[9], lmhash
[10], lmhash
[11],
84 lmhash
[12], lmhash
[13], lmhash
[14], lmhash
[15] );
87 static void test_SystemFunction008(void)
89 /* example data from http://davenport.sourceforge.net/ntlm.html */
90 unsigned char hash
[0x40] = {
91 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12,
92 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac };
93 unsigned char challenge
[0x40] = {
94 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
95 unsigned char expected
[0x18] = {
96 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
97 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d,
98 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 };
99 unsigned char output
[0x18];
102 r
= pSystemFunction008(0,0,0);
103 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
105 r
= pSystemFunction008(challenge
,0,0);
106 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
108 r
= pSystemFunction008(challenge
, hash
, 0);
109 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
114 r
= pSystemFunction008(challenge
, 0, output
);
115 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
118 r
= pSystemFunction008(0, 0, output
);
119 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
121 memset(output
, 0, sizeof output
);
122 r
= pSystemFunction008(challenge
, hash
, output
);
123 ok( r
== STATUS_SUCCESS
, "wrong error code\n");
125 ok( !memcmp(output
, expected
, sizeof expected
), "response wrong\n");
128 static void test_SystemFunction001(void)
130 unsigned char key
[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 };
131 unsigned char data
[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
132 unsigned char expected
[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 };
133 unsigned char output
[16];
136 r
= pSystemFunction001(0,0,0);
137 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
139 memset(output
, 0, sizeof output
);
141 r
= pSystemFunction001(data
,key
,output
);
142 ok( r
== STATUS_SUCCESS
, "wrong error code\n");
144 ok(!memcmp(output
, expected
, sizeof expected
), "response wrong\n");
147 static void test_SystemFunction002(void)
149 /* reverse of SystemFunction001 */
150 unsigned char key
[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 };
151 unsigned char expected
[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
152 unsigned char data
[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 };
153 unsigned char output
[8];
156 memset(output
, 0, sizeof output
);
157 r
= pSystemFunction002(data
, key
, output
);
158 ok(r
== STATUS_SUCCESS
, "function failed\n");
159 ok(!memcmp(output
, expected
, sizeof expected
), "response wrong\n");
162 static void test_SystemFunction032(void)
164 struct ustring key
, data
;
165 unsigned char szKey
[] = { 'f','o','o',0 };
166 unsigned char szData
[8] = { 'b','a','r',0 };
167 unsigned char expected
[] = {0x28, 0xb9, 0xf8, 0xe1};
170 /* crashes: pSystemFunction032(NULL,NULL); */
173 key
.Length
= sizeof szKey
;
174 key
.MaximumLength
= key
.Length
;
176 data
.Buffer
= szData
;
178 data
.MaximumLength
= 8;
180 r
= pSystemFunction032(&data
, &key
);
181 ok(r
== STATUS_SUCCESS
, "function failed\n");
183 ok(!memcmp(expected
, data
.Buffer
, data
.Length
), "wrong result\n");
186 static void test_SystemFunction003(void)
188 unsigned char output
[8], data
[8];
189 unsigned char key
[7] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24 };
190 unsigned char exp1
[8] = { 0x9d, 0x21, 0xc8, 0x86, 0x6c, 0x21, 0xcf, 0x43 };
191 char exp2
[] = "KGS!@#$%";
194 r
= pSystemFunction003(NULL
, NULL
);
195 ok(r
== STATUS_UNSUCCESSFUL
, "function failed\n");
197 r
= pSystemFunction003(key
, NULL
);
198 ok(r
== STATUS_UNSUCCESSFUL
, "function failed\n");
200 memset(data
, 0, sizeof data
);
201 r
= pSystemFunction003(key
, data
);
202 ok(r
== STATUS_SUCCESS
, "function failed\n");
203 ok( !memcmp(exp1
, data
, sizeof data
), "decrypted message wrong\n");
205 memset(output
, 0, sizeof output
);
206 r
= pSystemFunction002(data
, key
, output
);
207 ok(r
== STATUS_SUCCESS
, "function failed\n");
209 ok( !memcmp(exp2
, output
, sizeof output
), "decrypted message wrong\n");
212 static void test_SystemFunction004(void)
214 unsigned char inbuf
[0x100], keybuf
[0x100], resbuf
[0x100];
215 unsigned char output
[8];
217 struct ustring in
, key
, out
;
220 r = pSystemFunction004(NULL, NULL, NULL);
221 ok(r == STATUS_UNSUCCESSFUL, "function failed\n");
224 memset(inbuf
, 0, sizeof inbuf
);
225 memset(keybuf
, 0, sizeof keybuf
);
226 memset(resbuf
, 0, sizeof resbuf
);
229 in
.Length
= in
.MaximumLength
= 0;
232 key
.Length
= key
.MaximumLength
= 0;
235 out
.Length
= out
.MaximumLength
= 0;
237 r
= pSystemFunction004(&in
, &key
, &out
);
238 ok(r
== STATUS_INVALID_PARAMETER_2
, "function failed\n");
242 key
.MaximumLength
= 0x100;
244 r
= pSystemFunction004(&in
, &key
, &out
);
245 ok(r
== STATUS_BUFFER_TOO_SMALL
, "function failed\n");
249 in
.MaximumLength
= 0;
251 /* add two identical blocks... */
262 /* check that the Length field is really obeyed */
267 key
.MaximumLength
= 0;
273 out
.MaximumLength
= 0x40;
274 r
= pSystemFunction004(&in
, &key
, &out
);
275 ok(r
== STATUS_SUCCESS
, "function failed\n");
279 memset(output
, 0, sizeof output
);
280 r
= pSystemFunction002(out
.Buffer
, key
.Buffer
, output
);
281 ok(r
== STATUS_SUCCESS
, "function failed\n");
283 ok(((unsigned int*)output
)[0] == in
.Length
, "crypted length wrong\n");
284 ok(((unsigned int*)output
)[1] == 1, "crypted value wrong\n");
286 memset(output
, 0, sizeof output
);
287 r
= pSystemFunction002(out
.Buffer
+8, key
.Buffer
, output
);
288 ok(r
== STATUS_SUCCESS
, "function failed\n");
289 ok(!memcmp(output
, inbuf
, sizeof output
), "crypted data wrong\n");
291 memset(output
, 0, sizeof output
);
292 r
= pSystemFunction002(out
.Buffer
+16, key
.Buffer
, output
);
293 ok(r
== STATUS_SUCCESS
, "function failed\n");
294 ok(!memcmp(output
, inbuf
, sizeof output
), "crypted data wrong\n");
297 static void test_SystemFunction005(void)
299 char output
[0x40], result
[0x40];
301 struct ustring in
, key
, out
, res
;
302 static char datastr
[] = "twinkle twinkle little star";
303 static char keystr
[] = "byolnim";
305 in
.Buffer
= (unsigned char *)datastr
;
306 in
.Length
= strlen(datastr
);
307 in
.MaximumLength
= 0;
309 key
.Buffer
= (unsigned char *)keystr
;
310 key
.Length
= strlen(keystr
);
311 key
.MaximumLength
= 0;
313 out
.Buffer
= (unsigned char *)output
;
314 out
.Length
= out
.MaximumLength
= sizeof output
;
316 r
= pSystemFunction004(&in
, &key
, &out
);
317 ok(r
== STATUS_SUCCESS
, "function failed\n");
319 memset(result
, 0, sizeof result
);
320 res
.Buffer
= (unsigned char *)result
;
322 res
.MaximumLength
= sizeof result
;
324 r
= pSystemFunction005(&out
, &key
, &res
);
325 ok(r
== STATUS_SUCCESS
, "function failed\n");
327 r
= pSystemFunction005(&out
, &key
, &res
);
328 ok(r
== STATUS_SUCCESS
, "function failed\n");
330 ok(res
.Length
== in
.Length
, "Length wrong\n");
331 ok(!memcmp(res
.Buffer
, in
.Buffer
, in
.Length
), "data wrong\n");
334 out
.MaximumLength
= 0;
335 r
= pSystemFunction005(&out
, &key
, &res
);
336 ok(r
== STATUS_SUCCESS
||
337 r
== STATUS_INVALID_PARAMETER_1
, /* Vista */
338 "Expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER_1, got %08x\n", r
);
340 ok(res
.Length
== in
.Length
, "Length wrong\n");
341 ok(!memcmp(res
.Buffer
, in
.Buffer
, in
.Length
), "data wrong\n");
343 res
.MaximumLength
= 0;
344 r
= pSystemFunction005(&out
, &key
, &res
);
345 ok(r
== STATUS_BUFFER_TOO_SMALL
||
346 r
== STATUS_INVALID_PARAMETER_1
, /* Vista */
347 "Expected STATUS_BUFFER_TOO_SMALL or STATUS_INVALID_PARAMETER_1, got %08x\n", r
);
350 r
= pSystemFunction005(&out
, &key
, &res
);
351 ok(r
== STATUS_UNKNOWN_REVISION
||
352 r
== STATUS_INVALID_PARAMETER_1
, /* Vista */
353 "Expected STATUS_UNKNOWN_REVISION or STATUS_INVALID_PARAMETER_1, got %08x\n", r
);
356 r
= pSystemFunction005(&out
, &key
, &res
);
357 ok(r
== STATUS_INVALID_PARAMETER_2
, "function failed\n");
360 static void test_SystemFunction009(void)
362 unsigned char hash
[0x10] = {
363 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12,
364 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac };
365 unsigned char challenge
[8] = {
366 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
367 unsigned char expected
[0x18] = {
368 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
369 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d,
370 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 };
371 unsigned char output
[0x18];
374 memset(output
, 0, sizeof output
);
375 r
= pSystemFunction009(challenge
, hash
, output
);
376 ok( r
== STATUS_SUCCESS
, "wrong error code\n");
377 ok(!memcmp(output
, expected
, sizeof expected
), "response wrong\n");
380 static unsigned char des_key
[] = {
381 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24,
382 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24,
384 static unsigned char des_plaintext
[] = {
385 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
386 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0
388 static unsigned char des_ciphertext
[] = {
389 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
390 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, 0
393 /* test functions that encrypt two DES blocks */
394 static void test_SystemFunction_encrypt(descrypt func
, int num
)
396 unsigned char output
[0x11];
401 win_skip("SystemFunction%03d is not available\n", num
);
405 r
= func(NULL
, NULL
, NULL
);
406 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
408 memset(output
, 0, sizeof output
);
409 r
= func(des_plaintext
, des_key
, output
);
410 ok( r
== STATUS_SUCCESS
, "wrong error code\n");
411 ok( !memcmp(des_ciphertext
, output
, sizeof des_ciphertext
), "ciphertext wrong (%d)\n", num
);
414 /* test functions that decrypt two DES blocks */
415 static void test_SystemFunction_decrypt(descrypt func
, int num
)
417 unsigned char output
[0x11];
422 win_skip("SystemFunction%03d is not available\n", num
);
426 r
= func(NULL
, NULL
, NULL
);
427 ok( r
== STATUS_UNSUCCESSFUL
, "wrong error code\n");
429 memset(output
, 0, sizeof output
);
431 r
= func(des_ciphertext
, des_key
, output
);
432 ok( r
== STATUS_SUCCESS
, "wrong error code\n");
433 ok( !memcmp(des_plaintext
, output
, sizeof des_plaintext
), "plaintext wrong (%d)\n", num
);
436 static unsigned char des_ciphertext32
[] = {
437 0x69, 0x51, 0x35, 0x69, 0x0d, 0x29, 0x24, 0xad,
438 0x23, 0x6d, 0xfd, 0x43, 0x0d, 0xd3, 0x25, 0x81, 0
441 static void test_SystemFunction_enc32(descrypt func
, int num
)
443 unsigned char key
[4], output
[0x11];
448 win_skip("SystemFunction%03d is not available\n", num
);
452 memset(output
, 0, sizeof output
);
454 /* two keys are generated using 4 bytes, repeated 4 times ... */
455 memcpy(key
, "foo", 4);
457 r
= func(des_plaintext
, key
, output
);
458 ok( r
== STATUS_SUCCESS
, "wrong error code (%d)\n", num
);
460 ok( !memcmp( output
, des_ciphertext32
, sizeof des_ciphertext32
), "ciphertext wrong (%d)\n", num
);
463 static void test_SystemFunction_dec32(descrypt func
, int num
)
465 unsigned char key
[4], output
[0x11];
470 win_skip("SystemFunction%03d is not available\n", num
);
474 memset(output
, 0, sizeof output
);
476 /* two keys are generated using 4 bytes, repeated 4 times ... */
477 memcpy(key
, "foo", 4);
479 r
= func(des_ciphertext32
, key
, output
);
480 ok( r
== STATUS_SUCCESS
, "wrong error code (%d)\n", num
);
482 ok( !memcmp( output
, des_plaintext
, sizeof des_plaintext
), "plaintext wrong (%d)\n", num
);
485 static void test_memcmpfunc(memcmpfunc fn
)
487 unsigned char arg1
[0x20], arg2
[0x20];
492 win_skip("function is not available\n");
496 memset(arg1
, 0, sizeof arg1
);
497 memset(arg2
, 0, sizeof arg2
);
501 ok( r
== 1, "wrong error code\n");
503 memset(arg1
, 1, sizeof arg1
);
504 memset(arg2
, 1, sizeof arg2
);
508 ok( r
== 1, "wrong error code\n");
510 memset(arg1
, 0, sizeof arg1
);
511 memset(arg2
, 1, sizeof arg2
);
514 ok( r
== 0, "wrong error code\n");
516 memset(arg1
, 1, sizeof arg1
);
517 memset(arg2
, 0, sizeof arg2
);
520 ok( r
== 0, "wrong error code\n");
523 START_TEST(crypt_lmhash
)
525 HMODULE module
= GetModuleHandleA("advapi32.dll");
527 pSystemFunction001
= (void *)GetProcAddress( module
, "SystemFunction001" );
528 if (pSystemFunction001
)
529 test_SystemFunction001();
531 win_skip("SystemFunction001 is not available\n");
533 pSystemFunction002
= (void *)GetProcAddress( module
, "SystemFunction002" );
534 if (pSystemFunction002
)
535 test_SystemFunction002();
537 win_skip("SystemFunction002 is not available\n");
539 pSystemFunction003
= (void *)GetProcAddress( module
, "SystemFunction003" );
540 if (pSystemFunction003
)
541 test_SystemFunction003();
543 win_skip("SystemFunction002 is not available\n");
545 pSystemFunction004
= (void *)GetProcAddress( module
, "SystemFunction004" );
546 if (pSystemFunction004
)
547 test_SystemFunction004();
549 win_skip("SystemFunction004 is not available\n");
551 pSystemFunction005
= (void *)GetProcAddress( module
, "SystemFunction005" );
552 if (pSystemFunction005
)
553 test_SystemFunction005();
555 win_skip("SystemFunction005 is not available\n");
557 pSystemFunction006
= (void *)GetProcAddress( module
, "SystemFunction006" );
558 if (pSystemFunction006
)
559 test_SystemFunction006();
561 win_skip("SystemFunction006 is not available\n");
563 pSystemFunction008
= (void *)GetProcAddress( module
, "SystemFunction008" );
564 if (pSystemFunction008
)
565 test_SystemFunction008();
567 win_skip("SystemFunction008 is not available\n");
569 pSystemFunction009
= (void *)GetProcAddress( module
, "SystemFunction009" );
570 if (pSystemFunction009
)
571 test_SystemFunction009();
573 win_skip("SystemFunction009 is not available\n");
575 pSystemFunction012
= (descrypt
) GetProcAddress( module
, "SystemFunction012");
576 pSystemFunction013
= (descrypt
) GetProcAddress( module
, "SystemFunction013");
577 pSystemFunction014
= (descrypt
) GetProcAddress( module
, "SystemFunction014");
578 pSystemFunction015
= (descrypt
) GetProcAddress( module
, "SystemFunction015");
579 pSystemFunction016
= (descrypt
) GetProcAddress( module
, "SystemFunction016");
580 pSystemFunction017
= (descrypt
) GetProcAddress( module
, "SystemFunction017");
581 pSystemFunction018
= (descrypt
) GetProcAddress( module
, "SystemFunction018");
582 pSystemFunction019
= (descrypt
) GetProcAddress( module
, "SystemFunction019");
583 pSystemFunction020
= (descrypt
) GetProcAddress( module
, "SystemFunction020");
584 pSystemFunction021
= (descrypt
) GetProcAddress( module
, "SystemFunction021");
585 pSystemFunction022
= (descrypt
) GetProcAddress( module
, "SystemFunction022");
586 pSystemFunction023
= (descrypt
) GetProcAddress( module
, "SystemFunction023");
588 /* these all encrypt two DES blocks */
589 test_SystemFunction_encrypt(pSystemFunction012
, 12);
590 test_SystemFunction_encrypt(pSystemFunction014
, 14);
591 test_SystemFunction_encrypt(pSystemFunction016
, 16);
592 test_SystemFunction_encrypt(pSystemFunction018
, 18);
593 test_SystemFunction_encrypt(pSystemFunction020
, 20);
594 test_SystemFunction_encrypt(pSystemFunction022
, 22);
596 /* these all decrypt two DES blocks */
597 test_SystemFunction_decrypt(pSystemFunction013
, 13);
598 test_SystemFunction_decrypt(pSystemFunction015
, 15);
599 test_SystemFunction_decrypt(pSystemFunction017
, 17);
600 test_SystemFunction_decrypt(pSystemFunction019
, 19);
601 test_SystemFunction_decrypt(pSystemFunction021
, 21);
602 test_SystemFunction_decrypt(pSystemFunction023
, 23);
604 pSystemFunction024
= (descrypt
) GetProcAddress( module
, "SystemFunction024");
605 pSystemFunction025
= (descrypt
) GetProcAddress( module
, "SystemFunction025");
606 pSystemFunction026
= (descrypt
) GetProcAddress( module
, "SystemFunction026");
607 pSystemFunction027
= (descrypt
) GetProcAddress( module
, "SystemFunction027");
609 /* these encrypt two DES blocks with a short key */
610 test_SystemFunction_enc32(pSystemFunction024
, 24);
611 test_SystemFunction_enc32(pSystemFunction026
, 26);
613 /* these descrypt two DES blocks with a short key */
614 test_SystemFunction_dec32(pSystemFunction025
, 25);
615 test_SystemFunction_dec32(pSystemFunction027
, 27);
617 pSystemFunction030
= (memcmpfunc
) GetProcAddress( module
, "SystemFunction030" );
618 pSystemFunction031
= (memcmpfunc
) GetProcAddress( module
, "SystemFunction031" );
620 test_memcmpfunc(pSystemFunction030
);
621 test_memcmpfunc(pSystemFunction031
);
623 pSystemFunction032
= (void *)GetProcAddress( module
, "SystemFunction032" );
624 if (pSystemFunction032
)
625 test_SystemFunction032();
627 win_skip("SystemFunction032 is not available\n");