From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/advapi32/Makefile.in | 3 +-- dlls/advapi32/advapi32.spec | 2 +- dlls/cryptsp/Makefile.in | 5 ++++- .../{advapi32/crypt_arc4.c => cryptsp/arc4.c} | 22 ++++++------------- dlls/cryptsp/cryptsp.spec | 2 +- 5 files changed, 14 insertions(+), 20 deletions(-) rename dlls/{advapi32/crypt_arc4.c => cryptsp/arc4.c} (88%)
diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index 272f9764267..269bed5d410 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -1,14 +1,13 @@ EXTRADEFS = -D_ADVAPI32_ MODULE = advapi32.dll IMPORTLIB = advapi32 -IMPORTS = kernelbase sechost msvcrt +IMPORTS = kernelbase sechost msvcrt cryptsp DELAYIMPORTS = rpcrt4 user32 userenv
SOURCES = \ advapi.c \ cred.c \ crypt.c \ - crypt_arc4.c \ crypt_des.c \ crypt_lmhash.c \ eventlog.c \ diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index dde83cc7045..41eb3e7a32c 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -808,7 +808,7 @@ @ stub SystemFunction029 @ stdcall SystemFunction030(ptr ptr) @ stdcall SystemFunction031(ptr ptr) SystemFunction030 -@ stdcall SystemFunction032(ptr ptr) +@ stdcall SystemFunction032(ptr ptr) cryptsp.SystemFunction032 @ stub SystemFunction033 @ stub SystemFunction034 @ stdcall SystemFunction035(str) diff --git a/dlls/cryptsp/Makefile.in b/dlls/cryptsp/Makefile.in index 2422119d806..4a2a7c4ef5d 100644 --- a/dlls/cryptsp/Makefile.in +++ b/dlls/cryptsp/Makefile.in @@ -1,3 +1,6 @@ MODULE = cryptsp.dll - +IMPORTLIB = cryptsp IMPORTS = advapi32 + +SOURCES = \ + arc4.c diff --git a/dlls/advapi32/crypt_arc4.c b/dlls/cryptsp/arc4.c similarity index 88% rename from dlls/advapi32/crypt_arc4.c rename to dlls/cryptsp/arc4.c index 523cda224e7..e64eb85a8cb 100644 --- a/dlls/advapi32/crypt_arc4.c +++ b/dlls/cryptsp/arc4.c @@ -27,7 +27,12 @@ #include "windef.h" #include "winternl.h"
-#include "crypt.h" +struct ustring +{ + DWORD Length; + DWORD MaximumLength; + unsigned char *Buffer; +};
typedef struct tag_arc4_info { unsigned char state[256]; @@ -79,20 +84,7 @@ static void arc4_ProcessString(arc4_info *a4i, BYTE *inoutString, unsigned int l }
/****************************************************************************** - * SystemFunction032 [ADVAPI32.@] - * - * Encrypts a string data using ARC4 - * - * PARAMS - * data [I/O] data to encrypt - * key [I] key data - * - * RETURNS - * Success: STATUS_SUCCESS - * Failure: STATUS_UNSUCCESSFUL - * - * NOTES - * see http://web.it.kth.se/~rom/ntsec.html#crypto-strongavail + * SystemFunction032 (cryptsp.@) */ NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key) { diff --git a/dlls/cryptsp/cryptsp.spec b/dlls/cryptsp/cryptsp.spec index 98626b759f3..545e5294a4d 100644 --- a/dlls/cryptsp/cryptsp.spec +++ b/dlls/cryptsp/cryptsp.spec @@ -60,6 +60,6 @@ @ stdcall -import SystemFunction027(ptr ptr ptr) @ stdcall -import SystemFunction030(ptr ptr) @ stdcall -import SystemFunction031(ptr ptr) -@ stdcall -import SystemFunction032(ptr ptr) +@ stdcall SystemFunction032(ptr ptr) @ stub SystemFunction033 @ stdcall -import SystemFunction035(str)