diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index 224286f28cf..a55a3170a5a 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -13,7 +13,6 @@ C_SRCS = \ crypt_lmhash.c \ crypt_md4.c \ crypt_md5.c \ - crypt_sha.c \ eventlog.c \ lsa.c \ perf.c \ diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 1c92f62fe98..c8d8d8501bc 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -1,7 +1,7 @@ # 1000 stub ADVAPI32_1000 -@ stdcall A_SHAFinal(ptr ptr) -@ stdcall A_SHAInit(ptr) -@ stdcall A_SHAUpdate(ptr ptr long) +@ stdcall A_SHAFinal(ptr ptr) ntdll.A_SHAFinal +@ stdcall A_SHAInit(ptr) ntdll.A_SHAInit +@ stdcall A_SHAUpdate(ptr ptr long) ntdll.A_SHAUpdate @ stdcall AbortSystemShutdownA(ptr) @ stdcall AbortSystemShutdownW(ptr) @ stdcall AccessCheck(ptr long long ptr ptr ptr ptr ptr) diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index ed4bb94e4dc..1ad674e3b42 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -10,6 +10,7 @@ C_SRCS = \ atom.c \ cdrom.c \ critsection.c \ + crypt.c \ debugbuffer.c \ debugtools.c \ directory.c \ diff --git a/dlls/advapi32/crypt_sha.c b/dlls/ntdll/crypt.c similarity index 95% rename from dlls/advapi32/crypt_sha.c rename to dlls/ntdll/crypt.c index ffd59a7869a..2a1db55594d 100644 --- a/dlls/advapi32/crypt_sha.c +++ b/dlls/ntdll/crypt.c @@ -1,6 +1,5 @@ /* * Copyright 2004 Filip Navara - * Based on public domain SHA code by Steve Reid * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,7 +19,10 @@ #include #include "windef.h" -/* SHA Context Structure Declaration */ +/* SHA1 algorithm + * + * Based on public domain SHA code by Steve Reid + */ typedef struct { ULONG Unknown[6]; @@ -29,8 +31,6 @@ typedef struct { UCHAR Buffer[64]; } SHA_CTX, *PSHA_CTX; -/* SHA1 Helper Macros */ - #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* FIXME: This definition of DWORD2BE is little endian specific! */ #define DWORD2BE(x) (((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000); @@ -98,7 +98,7 @@ static void SHA1Transform(ULONG State[5], UCHAR Buffer[64]) /****************************************************************************** - * A_SHAInit [ADVAPI32.@] + * A_SHAInit (ntdll.@) * * Initialize a SHA context structure. * @@ -108,8 +108,7 @@ static void SHA1Transform(ULONG State[5], UCHAR Buffer[64]) * RETURNS * Nothing */ -VOID WINAPI -A_SHAInit(PSHA_CTX Context) +void WINAPI A_SHAInit(PSHA_CTX Context) { /* SHA1 initialization constants */ Context->State[0] = 0x67452301; @@ -122,7 +121,7 @@ A_SHAInit(PSHA_CTX Context) } /****************************************************************************** - * A_SHAUpdate [ADVAPI32.@] + * A_SHAUpdate (ntdll.@) * * Update a SHA context with a hashed data from supplied buffer. * @@ -134,8 +133,7 @@ A_SHAInit(PSHA_CTX Context) * RETURNS * Nothing */ -VOID WINAPI -A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize) +void WINAPI A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize) { ULONG BufferContentSize; @@ -166,7 +164,7 @@ A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize) } /****************************************************************************** - * A_SHAFinal [ADVAPI32.@] + * A_SHAFinal (ntdll.@) * * Finalize SHA context and return the resulting hash. * @@ -177,8 +175,7 @@ A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize) * RETURNS * Nothing */ -VOID WINAPI -A_SHAFinal(PSHA_CTX Context, PULONG Result) +void WINAPI A_SHAFinal(PSHA_CTX Context, PULONG Result) { INT Pad, Index; UCHAR Buffer[72]; diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 5d3b0cac58c..a6506465176 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -3,6 +3,9 @@ #if you change a Nt.. function DON'T FORGET to change the #Zw one too. +@ stdcall A_SHAFinal(ptr ptr) +@ stdcall A_SHAInit(ptr) +@ stdcall A_SHAUpdate(ptr ptr long) @ stdcall ApiSetQueryApiSetPresence(ptr ptr) @ stub CsrAllocateCaptureBuffer @ stub CsrAllocateCapturePointer