Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
b4899f07
Commit
b4899f07
authored
18 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
advapi32: Implement and test SystemFunction010.
parent
64ae8285
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/advapi32/advapi32.spec
+1
-1
1 addition, 1 deletion
dlls/advapi32/advapi32.spec
dlls/advapi32/crypt_md4.c
+27
-0
27 additions, 0 deletions
dlls/advapi32/crypt_md4.c
dlls/advapi32/tests/crypt_md4.c
+21
-0
21 additions, 0 deletions
dlls/advapi32/tests/crypt_md4.c
with
49 additions
and
1 deletion
dlls/advapi32/advapi32.spec
+
1
−
1
View file @
b4899f07
...
...
@@ -604,7 +604,7 @@
@ stdcall SystemFunction007(ptr ptr)
@ stdcall SystemFunction008(ptr ptr ptr)
@ stdcall SystemFunction009(ptr ptr ptr)
@ st
ub
SystemFunction010
@ st
dcall
SystemFunction010
(ptr ptr ptr)
@ stub SystemFunction011
@ stub SystemFunction012
@ stub SystemFunction013
...
...
This diff is collapsed.
Click to expand it.
dlls/advapi32/crypt_md4.c
+
27
−
0
View file @
b4899f07
...
...
@@ -296,3 +296,30 @@ NTSTATUS WINAPI SystemFunction007(PUNICODE_STRING string, LPBYTE hash)
return
STATUS_SUCCESS
;
}
/******************************************************************************
* SystemFunction010 [ADVAPI32.@]
*
* MD4 hashes 16 bytes of data
*
* PARAMS
* unknown [] seems to have no effect on the output
* data [I] pointer to data to hash (16 bytes)
* output [O] the md4 hash of the data (16 bytes)
*
* RETURNS
* Success: STATUS_SUCCESS
* Failure: STATUS_UNSUCCESSFUL
*
*/
NTSTATUS
WINAPI
SystemFunction010
(
LPVOID
unknown
,
LPBYTE
data
,
LPBYTE
hash
)
{
MD4_CTX
ctx
;
MD4Init
(
&
ctx
);
MD4Update
(
&
ctx
,
data
,
0x10
);
MD4Final
(
&
ctx
);
memcpy
(
hash
,
ctx
.
digest
,
0x10
);
return
STATUS_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
dlls/advapi32/tests/crypt_md4.c
+
21
−
0
View file @
b4899f07
...
...
@@ -40,11 +40,13 @@ typedef VOID (WINAPI *fnMD4Init)( MD4_CTX *ctx );
typedef
VOID
(
WINAPI
*
fnMD4Update
)(
MD4_CTX
*
ctx
,
const
unsigned
char
*
src
,
const
int
len
);
typedef
VOID
(
WINAPI
*
fnMD4Final
)(
MD4_CTX
*
ctx
);
typedef
int
(
WINAPI
*
fnSystemFunction007
)(
PUNICODE_STRING
,
LPBYTE
);
typedef
int
(
WINAPI
*
fnSystemFunction010
)(
LPVOID
,
const
LPBYTE
,
LPBYTE
);
fnMD4Init
pMD4Init
;
fnMD4Update
pMD4Update
;
fnMD4Final
pMD4Final
;
fnSystemFunction007
pSystemFunction007
;
fnSystemFunction010
pSystemFunction010
;
#define ctxcmp( a, b ) memcmp( (char*)a, (char*)b, FIELD_OFFSET( MD4_CTX, in ) )
...
...
@@ -124,6 +126,21 @@ static void test_SystemFunction007(void)
ok
(
!
memcmp
(
output
,
expected
,
sizeof
expected
),
"response wrong
\n
"
);
}
static
void
test_SystemFunction010
(
void
)
{
unsigned
char
expected
[
0x10
]
=
{
0x48
,
0x7c
,
0x3f
,
0x5e
,
0x2b
,
0x0d
,
0x6a
,
0x79
,
0x32
,
0x4e
,
0xcd
,
0xbe
,
0x9c
,
0x15
,
0x16
,
0x6f
};
unsigned
char
in
[
0x10
],
output
[
0x10
];
int
r
;
memset
(
in
,
0
,
sizeof
in
);
memset
(
output
,
0
,
sizeof
output
);
r
=
pSystemFunction010
(
0
,
in
,
output
);
ok
(
r
==
STATUS_SUCCESS
,
"wrong error code
\n
"
);
ok
(
!
memcmp
(
expected
,
output
,
sizeof
output
),
"output wrong
\n
"
);
}
START_TEST
(
crypt_md4
)
{
HMODULE
module
;
...
...
@@ -141,5 +158,9 @@ START_TEST(crypt_md4)
if
(
pSystemFunction007
)
test_SystemFunction007
();
pSystemFunction010
=
(
fnSystemFunction010
)
GetProcAddress
(
module
,
"SystemFunction010"
);
if
(
pSystemFunction010
)
test_SystemFunction010
();
FreeLibrary
(
module
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment