ReactOS 0.4.15-dev-7918-g2a2556c
crypt_lmhash.c
Go to the documentation of this file.
1/*
2 * Unit tests for SystemFunctionXXX (LMHash?)
3 *
4 * Copyright 2004 Hans Leidekker
5 * Copyright 2006 Mike McCormack
6 *
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.
11 *
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.
16 *
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
20 */
21
22#include <stdio.h>
23
24#include "ntstatus.h"
25#define WIN32_NO_STATUS
26#include "wine/test.h"
27#include "windef.h"
28#include "winbase.h"
29#include "winternl.h"
30
31struct ustring {
34 unsigned char *Buffer;
35};
36
37typedef int (WINAPI *descrypt)(unsigned char *, unsigned char *, unsigned char *);
38static NTSTATUS (WINAPI *pSystemFunction001)(const BYTE *, const BYTE *, LPBYTE);
39static NTSTATUS (WINAPI *pSystemFunction002)(const BYTE *, const BYTE *, LPBYTE);
40static NTSTATUS (WINAPI *pSystemFunction003)(const BYTE *, LPBYTE);
41static NTSTATUS (WINAPI *pSystemFunction004)(const struct ustring *, const struct ustring *, struct ustring *);
42static NTSTATUS (WINAPI *pSystemFunction005)(const struct ustring *, const struct ustring *, struct ustring *);
43static VOID (WINAPI *pSystemFunction006)( PCSTR passwd, PSTR lmhash );
44static NTSTATUS (WINAPI *pSystemFunction008)(const BYTE *, const BYTE *, LPBYTE);
45static NTSTATUS (WINAPI *pSystemFunction009)(const BYTE *, const BYTE *, LPBYTE);
46static NTSTATUS (WINAPI *pSystemFunction032)(struct ustring *, const struct ustring *);
47
48/* encrypt two blocks */
55
56/* decrypt two blocks */
63
64/* encrypt two blocks with a 32bit key */
67
68/* decrypt two blocks with a 32bit key */
71
72typedef int (WINAPI *memcmpfunc)(unsigned char *, unsigned char *);
75
76static void test_SystemFunction006(void)
77{
78 char lmhash[16 + 1];
79
80 char passwd[] = { 's','e','c','r','e','t', 0, 0, 0, 0, 0, 0, 0, 0 };
81 unsigned char expect[] =
82 { 0x85, 0xf5, 0x28, 0x9f, 0x09, 0xdc, 0xa7, 0xeb,
83 0xaa, 0xd3, 0xb4, 0x35, 0xb5, 0x14, 0x04, 0xee };
84
85 pSystemFunction006( passwd, lmhash );
86
87 ok( !memcmp( lmhash, expect, sizeof(expect) ),
88 "lmhash: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
89 lmhash[0], lmhash[1], lmhash[2], lmhash[3], lmhash[4], lmhash[5],
90 lmhash[6], lmhash[7], lmhash[8], lmhash[9], lmhash[10], lmhash[11],
91 lmhash[12], lmhash[13], lmhash[14], lmhash[15] );
92}
93
94static void test_SystemFunction008(void)
95{
96 /* example data from http://davenport.sourceforge.net/ntlm.html */
97 unsigned char hash[0x40] = {
98 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12,
99 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac };
100 unsigned char challenge[0x40] = {
101 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
102 unsigned char expected[0x18] = {
103 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
104 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d,
105 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 };
106 unsigned char output[0x18];
107 NTSTATUS r;
108
109 r = pSystemFunction008(0,0,0);
110 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
111
112 r = pSystemFunction008(challenge,0,0);
113 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
114
115 r = pSystemFunction008(challenge, hash, 0);
116 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
117
118 /* crashes */
119 if (0)
120 {
121 r = pSystemFunction008(challenge, 0, output);
122 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
123 }
124
125 r = pSystemFunction008(0, 0, output);
126 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
127
128 memset(output, 0, sizeof output);
129 r = pSystemFunction008(challenge, hash, output);
130 ok( r == STATUS_SUCCESS, "wrong error code\n");
131
132 ok( !memcmp(output, expected, sizeof expected), "response wrong\n");
133}
134
135static void test_SystemFunction001(void)
136{
137 unsigned char key[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 };
138 unsigned char data[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
139 unsigned char expected[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 };
140 unsigned char output[16];
141 NTSTATUS r;
142
143 r = pSystemFunction001(0,0,0);
144 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
145
146 memset(output, 0, sizeof output);
147
148 r = pSystemFunction001(data,key,output);
149 ok( r == STATUS_SUCCESS, "wrong error code\n");
150
151 ok(!memcmp(output, expected, sizeof expected), "response wrong\n");
152}
153
154static void test_SystemFunction002(void)
155{
156 /* reverse of SystemFunction001 */
157 unsigned char key[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 };
158 unsigned char expected[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
159 unsigned char data[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 };
160 unsigned char output[8];
161 int r;
162
163 memset(output, 0, sizeof output);
164 r = pSystemFunction002(data, key, output);
165 ok(r == STATUS_SUCCESS, "function failed\n");
166 ok(!memcmp(output, expected, sizeof expected), "response wrong\n");
167}
168
169static void test_SystemFunction032(void)
170{
171 struct ustring key, data;
172 unsigned char szKey[] = { 'f','o','o',0 };
173 unsigned char szData[8] = { 'b','a','r',0 };
174 unsigned char expected[] = {0x28, 0xb9, 0xf8, 0xe1};
175 int r;
176
177 /* crashes: pSystemFunction032(NULL,NULL); */
178
179 key.Buffer = szKey;
180 key.Length = sizeof szKey;
181 key.MaximumLength = key.Length;
182
183 data.Buffer = szData;
184 data.Length = 4;
185 data.MaximumLength = 8;
186
187 r = pSystemFunction032(&data, &key);
188 ok(r == STATUS_SUCCESS, "function failed\n");
189
190 ok(!memcmp(expected, data.Buffer, data.Length), "wrong result\n");
191}
192
193static void test_SystemFunction003(void)
194{
195 unsigned char output[8], data[8];
196 unsigned char key[7] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24 };
197 unsigned char exp1[8] = { 0x9d, 0x21, 0xc8, 0x86, 0x6c, 0x21, 0xcf, 0x43 };
198 char exp2[] = "KGS!@#$%";
199 int r;
200
201 r = pSystemFunction003(NULL, NULL);
202 ok(r == STATUS_UNSUCCESSFUL, "function failed\n");
203
204 r = pSystemFunction003(key, NULL);
205 ok(r == STATUS_UNSUCCESSFUL, "function failed\n");
206
207 memset(data, 0, sizeof data);
208 r = pSystemFunction003(key, data);
209 ok(r == STATUS_SUCCESS, "function failed\n");
210 ok( !memcmp(exp1, data, sizeof data), "decrypted message wrong\n");
211
212 memset(output, 0, sizeof output);
213 r = pSystemFunction002(data, key, output);
214 ok(r == STATUS_SUCCESS, "function failed\n");
215
216 ok( !memcmp(exp2, output, sizeof output), "decrypted message wrong\n");
217}
218
219static void test_SystemFunction004(void)
220{
221 unsigned char inbuf[0x100], keybuf[0x100], resbuf[0x100];
222 unsigned char output[8];
223 int r;
224 struct ustring in, key, out;
225
226 /* crash
227 r = pSystemFunction004(NULL, NULL, NULL);
228 ok(r == STATUS_UNSUCCESSFUL, "function failed\n");
229 */
230
231 memset(inbuf, 0, sizeof inbuf);
232 memset(keybuf, 0, sizeof keybuf);
233 memset(resbuf, 0, sizeof resbuf);
234
235 in.Buffer = NULL;
236 in.Length = in.MaximumLength = 0;
237
238 key.Buffer = NULL;
239 key.Length = key.MaximumLength = 0;
240
241 out.Buffer = NULL;
242 out.Length = out.MaximumLength = 0;
243
244 r = pSystemFunction004(&in, &key, &out);
245 ok(r == STATUS_INVALID_PARAMETER_2, "function failed\n");
246
247 key.Buffer = keybuf;
248 key.Length = 0x100;
249 key.MaximumLength = 0x100;
250
251 r = pSystemFunction004(&in, &key, &out);
252 ok(r == STATUS_BUFFER_TOO_SMALL, "function failed\n");
253
254 in.Buffer = inbuf;
255 in.Length = 0x0c;
256 in.MaximumLength = 0;
257
258 /* add two identical blocks... */
259 inbuf[0] = 1;
260 inbuf[1] = 2;
261 inbuf[2] = 3;
262 inbuf[3] = 4;
263
264 inbuf[8] = 1;
265 inbuf[9] = 2;
266 inbuf[10] = 3;
267 inbuf[11] = 4;
268
269 /* check that the Length field is really obeyed */
270 keybuf[6] = 1;
271
272 key.Buffer = keybuf;
273 key.Length = 6;
274 key.MaximumLength = 0;
275
276 keybuf[1] = 0x33;
277
278 out.Buffer = resbuf;
279 out.Length = 0;
280 out.MaximumLength = 0x40;
281 r = pSystemFunction004(&in, &key, &out);
282 ok(r == STATUS_SUCCESS, "function failed\n");
283
284 keybuf[6] = 0;
285
286 memset(output, 0, sizeof output);
287 r = pSystemFunction002(out.Buffer, key.Buffer, output);
288 ok(r == STATUS_SUCCESS, "function failed\n");
289
290 ok(((unsigned int*)output)[0] == in.Length, "crypted length wrong\n");
291 ok(((unsigned int*)output)[1] == 1, "crypted value wrong\n");
292
293 memset(output, 0, sizeof output);
294 r = pSystemFunction002(out.Buffer+8, key.Buffer, output);
295 ok(r == STATUS_SUCCESS, "function failed\n");
296 ok(!memcmp(output, inbuf, sizeof output), "crypted data wrong\n");
297
298 memset(output, 0, sizeof output);
299 r = pSystemFunction002(out.Buffer+16, key.Buffer, output);
300 ok(r == STATUS_SUCCESS, "function failed\n");
301 ok(!memcmp(output, inbuf, sizeof output), "crypted data wrong\n");
302}
303
304static void test_SystemFunction005(void)
305{
306 char output[0x40], result[0x40];
307 int r;
308 struct ustring in, key, out, res;
309 static char datastr[] = "twinkle twinkle little star";
310 static char keystr[] = "byolnim";
311
312 in.Buffer = (unsigned char *)datastr;
313 in.Length = strlen(datastr);
314 in.MaximumLength = 0;
315
316 key.Buffer = (unsigned char *)keystr;
317 key.Length = strlen(keystr);
318 key.MaximumLength = 0;
319
320 out.Buffer = (unsigned char *)output;
321 out.Length = out.MaximumLength = sizeof output;
322
323 r = pSystemFunction004(&in, &key, &out);
324 ok(r == STATUS_SUCCESS, "function failed\n");
325
326 memset(result, 0, sizeof result);
327 res.Buffer = (unsigned char *)result;
328 res.Length = 0;
329 res.MaximumLength = sizeof result;
330
331 r = pSystemFunction005(&out, &key, &res);
332 ok(r == STATUS_SUCCESS, "function failed\n");
333
334 r = pSystemFunction005(&out, &key, &res);
335 ok(r == STATUS_SUCCESS, "function failed\n");
336
337 ok(res.Length == in.Length, "Length wrong\n");
338 ok(!memcmp(res.Buffer, in.Buffer, in.Length), "data wrong\n");
339
340 out.Length = 0;
341 out.MaximumLength = 0;
342 r = pSystemFunction005(&out, &key, &res);
343 ok(r == STATUS_SUCCESS ||
344 r == STATUS_INVALID_PARAMETER_1, /* Vista */
345 "Expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER_1, got %08x\n", r);
346
347 ok(res.Length == in.Length, "Length wrong\n");
348 ok(!memcmp(res.Buffer, in.Buffer, in.Length), "data wrong\n");
349
350 res.MaximumLength = 0;
351 r = pSystemFunction005(&out, &key, &res);
353 r == STATUS_INVALID_PARAMETER_1, /* Vista */
354 "Expected STATUS_BUFFER_TOO_SMALL or STATUS_INVALID_PARAMETER_1, got %08x\n", r);
355
356 key.Length = 1;
357 r = pSystemFunction005(&out, &key, &res);
359 r == STATUS_INVALID_PARAMETER_1, /* Vista */
360 "Expected STATUS_UNKNOWN_REVISION or STATUS_INVALID_PARAMETER_1, got %08x\n", r);
361
362 key.Length = 0;
363 r = pSystemFunction005(&out, &key, &res);
364 ok(r == STATUS_INVALID_PARAMETER_2, "function failed\n");
365}
366
367static void test_SystemFunction009(void)
368{
369 unsigned char hash[0x10] = {
370 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12,
371 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac };
372 unsigned char challenge[8] = {
373 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
374 unsigned char expected[0x18] = {
375 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
376 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d,
377 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 };
378 unsigned char output[0x18];
379 int r;
380
381 memset(output, 0, sizeof output);
382 r = pSystemFunction009(challenge, hash, output);
383 ok( r == STATUS_SUCCESS, "wrong error code\n");
384 ok(!memcmp(output, expected, sizeof expected), "response wrong\n");
385}
386
387static unsigned char des_key[] = {
388 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24,
389 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24,
390};
391static unsigned char des_plaintext[] = {
392 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
393 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0
394};
395static unsigned char des_ciphertext[] = {
396 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97,
397 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, 0
398};
399
400/* test functions that encrypt two DES blocks */
402{
403 unsigned char output[0x11];
404 int r;
405
406 if (!func)
407 {
408 win_skip("SystemFunction%03d is not available\n", num);
409 return;
410 }
411
412 r = func(NULL, NULL, NULL);
413 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
414
415 memset(output, 0, sizeof output);
416 r = func(des_plaintext, des_key, output);
417 ok( r == STATUS_SUCCESS, "wrong error code\n");
418 ok( !memcmp(des_ciphertext, output, sizeof des_ciphertext), "ciphertext wrong (%d)\n", num);
419}
420
421/* test functions that decrypt two DES blocks */
423{
424 unsigned char output[0x11];
425 int r;
426
427 if (!func)
428 {
429 win_skip("SystemFunction%03d is not available\n", num);
430 return;
431 }
432
433 r = func(NULL, NULL, NULL);
434 ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n");
435
436 memset(output, 0, sizeof output);
437
438 r = func(des_ciphertext, des_key, output);
439 ok( r == STATUS_SUCCESS, "wrong error code\n");
440 ok( !memcmp(des_plaintext, output, sizeof des_plaintext), "plaintext wrong (%d)\n", num);
441}
442
443static unsigned char des_ciphertext32[] = {
444 0x69, 0x51, 0x35, 0x69, 0x0d, 0x29, 0x24, 0xad,
445 0x23, 0x6d, 0xfd, 0x43, 0x0d, 0xd3, 0x25, 0x81, 0
446};
447
449{
450 unsigned char key[4], output[0x11];
451 int r;
452
453 if (!func)
454 {
455 win_skip("SystemFunction%03d is not available\n", num);
456 return;
457 }
458
459 memset(output, 0, sizeof output);
460
461 /* two keys are generated using 4 bytes, repeated 4 times ... */
462 memcpy(key, "foo", 4);
463
464 r = func(des_plaintext, key, output);
465 ok( r == STATUS_SUCCESS, "wrong error code (%d)\n", num);
466
467 ok( !memcmp( output, des_ciphertext32, sizeof des_ciphertext32), "ciphertext wrong (%d)\n", num);
468}
469
471{
472 unsigned char key[4], output[0x11];
473 int r;
474
475 if (!func)
476 {
477 win_skip("SystemFunction%03d is not available\n", num);
478 return;
479 }
480
481 memset(output, 0, sizeof output);
482
483 /* two keys are generated using 4 bytes, repeated 4 times ... */
484 memcpy(key, "foo", 4);
485
486 r = func(des_ciphertext32, key, output);
487 ok( r == STATUS_SUCCESS, "wrong error code (%d)\n", num);
488
489 ok( !memcmp( output, des_plaintext, sizeof des_plaintext), "plaintext wrong (%d)\n", num);
490}
491
493{
494 unsigned char arg1[0x20], arg2[0x20];
495 int r;
496
497 if (!fn)
498 {
499 win_skip("function is not available\n");
500 return;
501 }
502
503 memset(arg1, 0, sizeof arg1);
504 memset(arg2, 0, sizeof arg2);
505 arg1[0x10] = 1;
506
507 r = fn(arg1, arg2);
508 ok( r == 1, "wrong error code\n");
509
510 memset(arg1, 1, sizeof arg1);
511 memset(arg2, 1, sizeof arg2);
512 arg1[0x10] = 0;
513
514 r = fn(arg1, arg2);
515 ok( r == 1, "wrong error code\n");
516
517 memset(arg1, 0, sizeof arg1);
518 memset(arg2, 1, sizeof arg2);
519
520 r = fn(arg1, arg2);
521 ok( r == 0, "wrong error code\n");
522
523 memset(arg1, 1, sizeof arg1);
524 memset(arg2, 0, sizeof arg2);
525
526 r = fn(arg1, arg2);
527 ok( r == 0, "wrong error code\n");
528}
529
530START_TEST(crypt_lmhash)
531{
532 HMODULE module = GetModuleHandleA("advapi32.dll");
533
534 pSystemFunction001 = (void *)GetProcAddress( module, "SystemFunction001" );
535 if (pSystemFunction001)
537 else
538 win_skip("SystemFunction001 is not available\n");
539
540 pSystemFunction002 = (void *)GetProcAddress( module, "SystemFunction002" );
541 if (pSystemFunction002)
543 else
544 win_skip("SystemFunction002 is not available\n");
545
546 pSystemFunction003 = (void *)GetProcAddress( module, "SystemFunction003" );
547 if (pSystemFunction003)
549 else
550 win_skip("SystemFunction002 is not available\n");
551
552 pSystemFunction004 = (void *)GetProcAddress( module, "SystemFunction004" );
553 if (pSystemFunction004)
555 else
556 win_skip("SystemFunction004 is not available\n");
557
558 pSystemFunction005 = (void *)GetProcAddress( module, "SystemFunction005" );
559 if (pSystemFunction005)
561 else
562 win_skip("SystemFunction005 is not available\n");
563
564 pSystemFunction006 = (void *)GetProcAddress( module, "SystemFunction006" );
565 if (pSystemFunction006)
567 else
568 win_skip("SystemFunction006 is not available\n");
569
570 pSystemFunction008 = (void *)GetProcAddress( module, "SystemFunction008" );
571 if (pSystemFunction008)
573 else
574 win_skip("SystemFunction008 is not available\n");
575
576 pSystemFunction009 = (void *)GetProcAddress( module, "SystemFunction009" );
577 if (pSystemFunction009)
579 else
580 win_skip("SystemFunction009 is not available\n");
581
582 pSystemFunction012 = (descrypt) GetProcAddress( module, "SystemFunction012");
583 pSystemFunction013 = (descrypt) GetProcAddress( module, "SystemFunction013");
584 pSystemFunction014 = (descrypt) GetProcAddress( module, "SystemFunction014");
585 pSystemFunction015 = (descrypt) GetProcAddress( module, "SystemFunction015");
586 pSystemFunction016 = (descrypt) GetProcAddress( module, "SystemFunction016");
587 pSystemFunction017 = (descrypt) GetProcAddress( module, "SystemFunction017");
588 pSystemFunction018 = (descrypt) GetProcAddress( module, "SystemFunction018");
589 pSystemFunction019 = (descrypt) GetProcAddress( module, "SystemFunction019");
590 pSystemFunction020 = (descrypt) GetProcAddress( module, "SystemFunction020");
591 pSystemFunction021 = (descrypt) GetProcAddress( module, "SystemFunction021");
592 pSystemFunction022 = (descrypt) GetProcAddress( module, "SystemFunction022");
593 pSystemFunction023 = (descrypt) GetProcAddress( module, "SystemFunction023");
594
595 /* these all encrypt two DES blocks */
602
603 /* these all decrypt two DES blocks */
610
611 pSystemFunction024 = (descrypt) GetProcAddress( module, "SystemFunction024");
612 pSystemFunction025 = (descrypt) GetProcAddress( module, "SystemFunction025");
613 pSystemFunction026 = (descrypt) GetProcAddress( module, "SystemFunction026");
614 pSystemFunction027 = (descrypt) GetProcAddress( module, "SystemFunction027");
615
616 /* these encrypt two DES blocks with a short key */
619
620 /* these descrypt two DES blocks with a short key */
623
624 pSystemFunction030 = (memcmpfunc) GetProcAddress( module, "SystemFunction030" );
625 pSystemFunction031 = (memcmpfunc) GetProcAddress( module, "SystemFunction031" );
626
629
630 pSystemFunction032 = (void *)GetProcAddress( module, "SystemFunction032" );
631 if (pSystemFunction032)
633 else
634 win_skip("SystemFunction032 is not available\n");
635}
#define expect(EXPECTED, GOT)
Definition: SystemMenu.c:483
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define VOID
Definition: acefi.h:82
static int inbuf
Definition: adnsresfilter.c:73
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define NTSTATUS
Definition: precomp.h:21
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLenum func
Definition: glext.h:6028
GLuint res
Definition: glext.h:9613
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
GLuint in
Definition: glext.h:9616
GLuint GLuint num
Definition: glext.h:9618
GLuint64EXT * result
Definition: glext.h:11304
double __cdecl exp2(double)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static descrypt pSystemFunction027
Definition: crypt_lmhash.c:70
static void test_SystemFunction008(void)
Definition: crypt_lmhash.c:94
static descrypt pSystemFunction015
Definition: crypt_lmhash.c:58
static void test_SystemFunction003(void)
Definition: crypt_lmhash.c:193
static void test_memcmpfunc(memcmpfunc fn)
Definition: crypt_lmhash.c:492
static void test_SystemFunction009(void)
Definition: crypt_lmhash.c:367
static descrypt pSystemFunction013
Definition: crypt_lmhash.c:57
static void test_SystemFunction_encrypt(descrypt func, int num)
Definition: crypt_lmhash.c:401
static descrypt pSystemFunction019
Definition: crypt_lmhash.c:60
static unsigned char des_plaintext[]
Definition: crypt_lmhash.c:391
static descrypt pSystemFunction023
Definition: crypt_lmhash.c:62
static void test_SystemFunction006(void)
Definition: crypt_lmhash.c:76
static const struct ustring struct ustring *static const struct ustring struct ustring *static PSTR lmhash
Definition: crypt_lmhash.c:43
static unsigned char des_ciphertext[]
Definition: crypt_lmhash.c:395
int(WINAPI * descrypt)(unsigned char *, unsigned char *, unsigned char *)
Definition: crypt_lmhash.c:37
static descrypt pSystemFunction021
Definition: crypt_lmhash.c:61
static const BYTE LPBYTE
Definition: crypt_lmhash.c:38
static memcmpfunc pSystemFunction031
Definition: crypt_lmhash.c:74
static void test_SystemFunction032(void)
Definition: crypt_lmhash.c:169
static void test_SystemFunction004(void)
Definition: crypt_lmhash.c:219
static descrypt pSystemFunction025
Definition: crypt_lmhash.c:66
static descrypt pSystemFunction022
Definition: crypt_lmhash.c:54
static void test_SystemFunction001(void)
Definition: crypt_lmhash.c:135
static const struct ustring *static descrypt pSystemFunction012
Definition: crypt_lmhash.c:49
static void test_SystemFunction_dec32(descrypt func, int num)
Definition: crypt_lmhash.c:470
static memcmpfunc pSystemFunction030
Definition: crypt_lmhash.c:73
static void test_SystemFunction002(void)
Definition: crypt_lmhash.c:154
static descrypt pSystemFunction016
Definition: crypt_lmhash.c:51
static void test_SystemFunction_enc32(descrypt func, int num)
Definition: crypt_lmhash.c:448
static descrypt pSystemFunction014
Definition: crypt_lmhash.c:50
int(WINAPI * memcmpfunc)(unsigned char *, unsigned char *)
Definition: crypt_lmhash.c:72
static descrypt pSystemFunction026
Definition: crypt_lmhash.c:69
static void test_SystemFunction_decrypt(descrypt func, int num)
Definition: crypt_lmhash.c:422
static descrypt pSystemFunction024
Definition: crypt_lmhash.c:65
static descrypt pSystemFunction018
Definition: crypt_lmhash.c:52
static unsigned char des_ciphertext32[]
Definition: crypt_lmhash.c:443
static void test_SystemFunction005(void)
Definition: crypt_lmhash.c:304
static descrypt pSystemFunction017
Definition: crypt_lmhash.c:59
static descrypt pSystemFunction020
Definition: crypt_lmhash.c:53
BOOL expected
Definition: store.c:2063
#define STATUS_UNKNOWN_REVISION
Definition: ntstatus.h:324
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:475
static FILE * out
Definition: regtests2xml.c:44
#define win_skip
Definition: test.h:160
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
Definition: _hash_fun.h:40
Definition: copy.c:22
Definition: config.c:19
DWORD Length
Definition: config.c:20
DWORD MaximumLength
Definition: config.c:21
unsigned char * Buffer
Definition: config.c:22
char * PSTR
Definition: typedefs.h:51
const char * PCSTR
Definition: typedefs.h:52
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
#define WINAPI
Definition: msvc.h:6
unsigned char BYTE
Definition: xxhash.c:193