Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
45e0f91d
Commit
45e0f91d
authored
Jun 24, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Move SHA1 implementation to ntdll.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f535bcb2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
Makefile.in
dlls/advapi32/Makefile.in
+0
-1
advapi32.spec
dlls/advapi32/advapi32.spec
+3
-3
Makefile.in
dlls/ntdll/Makefile.in
+1
-0
crypt.c
dlls/ntdll/crypt.c
+10
-13
ntdll.spec
dlls/ntdll/ntdll.spec
+3
-0
No files found.
dlls/advapi32/Makefile.in
View file @
45e0f91d
...
...
@@ -13,7 +13,6 @@ C_SRCS = \
crypt_lmhash.c
\
crypt_md4.c
\
crypt_md5.c
\
crypt_sha.c
\
eventlog.c
\
lsa.c
\
perf.c
\
...
...
dlls/advapi32/advapi32.spec
View file @
45e0f91d
# 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)
...
...
dlls/ntdll/Makefile.in
View file @
45e0f91d
...
...
@@ -10,6 +10,7 @@ C_SRCS = \
atom.c
\
cdrom.c
\
critsection.c
\
crypt.c
\
debugbuffer.c
\
debugtools.c
\
directory.c
\
...
...
dlls/
advapi32/crypt_sha
.c
→
dlls/
ntdll/crypt
.c
View file @
45e0f91d
/*
* 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
];
...
...
dlls/ntdll/ntdll.spec
View file @
45e0f91d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment