advapi32: Move SHA1 implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f535bcb2e6
commit
45e0f91de1
|
@ -13,7 +13,6 @@ C_SRCS = \
|
|||
crypt_lmhash.c \
|
||||
crypt_md4.c \
|
||||
crypt_md5.c \
|
||||
crypt_sha.c \
|
||||
eventlog.c \
|
||||
lsa.c \
|
||||
perf.c \
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -10,6 +10,7 @@ C_SRCS = \
|
|||
atom.c \
|
||||
cdrom.c \
|
||||
critsection.c \
|
||||
crypt.c \
|
||||
debugbuffer.c \
|
||||
debugtools.c \
|
||||
directory.c \
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* Copyright 2004 Filip Navara
|
||||
* Based on public domain SHA code by Steve Reid <steve@edmweb.com>
|
||||
*
|
||||
* 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 <stdarg.h>
|
||||
#include "windef.h"
|
||||
|
||||
/* SHA Context Structure Declaration */
|
||||
/* SHA1 algorithm
|
||||
*
|
||||
* Based on public domain SHA code by Steve Reid <steve@edmweb.com>
|
||||
*/
|
||||
|
||||
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];
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue