Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f95c2e46
Commit
f95c2e46
authored
Nov 16, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt: Remove unused argument from hash_finalize().
parent
ffad823e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
bcrypt_main.c
dlls/bcrypt/bcrypt_main.c
+9
-10
No files found.
dlls/bcrypt/bcrypt_main.c
View file @
f95c2e46
...
...
@@ -1039,10 +1039,10 @@ NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG s
return
hash_update
(
&
hash
->
inner
,
hash
->
alg_id
,
input
,
size
);
}
static
NTSTATUS
hash_finalize
(
struct
hash
*
hash
,
UCHAR
*
output
,
ULONG
size
)
static
NTSTATUS
hash_finalize
(
struct
hash
*
hash
,
UCHAR
*
output
)
{
UCHAR
buffer
[
MAX_HASH_OUTPUT_BYTES
];
int
hash_length
;
ULONG
hash_length
=
builtin_algorithms
[
hash
->
alg_id
].
hash_length
;
NTSTATUS
status
;
if
(
!
(
hash
->
flags
&
HASH_FLAG_HMAC
))
...
...
@@ -1052,7 +1052,6 @@ static NTSTATUS hash_finalize( struct hash *hash, UCHAR *output, ULONG size )
return
STATUS_SUCCESS
;
}
hash_length
=
builtin_algorithms
[
hash
->
alg_id
].
hash_length
;
if
((
status
=
hash_finish
(
&
hash
->
inner
,
hash
->
alg_id
,
buffer
)))
return
status
;
if
((
status
=
hash_update
(
&
hash
->
outer
,
hash
->
alg_id
,
buffer
,
hash_length
)))
return
status
;
if
((
status
=
hash_finish
(
&
hash
->
outer
,
hash
->
alg_id
,
output
)))
return
status
;
...
...
@@ -1070,7 +1069,7 @@ NTSTATUS WINAPI BCryptFinishHash( BCRYPT_HASH_HANDLE handle, UCHAR *output, ULON
if
(
!
hash
)
return
STATUS_INVALID_HANDLE
;
if
(
!
output
||
size
!=
builtin_algorithms
[
hash
->
alg_id
].
hash_length
)
return
STATUS_INVALID_PARAMETER
;
return
hash_finalize
(
hash
,
output
,
size
);
return
hash_finalize
(
hash
,
output
);
}
NTSTATUS
WINAPI
BCryptHash
(
BCRYPT_ALG_HANDLE
handle
,
UCHAR
*
secret
,
ULONG
secret_len
,
...
...
@@ -1096,7 +1095,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE handle, UCHAR *secret, ULONG secre
hash_destroy
(
hash
);
return
status
;
}
status
=
hash_finalize
(
hash
,
output
,
output_len
);
status
=
hash_finalize
(
hash
,
output
);
hash_destroy
(
hash
);
return
status
;
}
...
...
@@ -2159,9 +2158,9 @@ NTSTATUS WINAPI BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE handle, BCRYPT_ALG_HANDL
return
STATUS_NOT_IMPLEMENTED
;
}
len
=
builtin_algorithms
[
hash
->
alg_id
].
hash_length
;
if
((
status
=
hash_finalize
(
hash
,
buf
,
len
)))
return
status
;
if
((
status
=
hash_finalize
(
hash
,
buf
)))
return
status
;
len
=
builtin_algorithms
[
hash
->
alg_id
].
hash_length
;
if
(
len
<
keylen
)
{
UCHAR
pad1
[
HMAC_PAD_LEN
],
pad2
[
HMAC_PAD_LEN
];
...
...
@@ -2175,11 +2174,11 @@ NTSTATUS WINAPI BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE handle, BCRYPT_ALG_HANDL
if
((
status
=
hash_prepare
(
hash
))
||
(
status
=
hash_update
(
&
hash
->
inner
,
hash
->
alg_id
,
pad1
,
sizeof
(
pad1
)
))
||
(
status
=
hash_finalize
(
hash
,
buf
,
len
)))
return
status
;
(
status
=
hash_finalize
(
hash
,
buf
)))
return
status
;
if
((
status
=
hash_prepare
(
hash
))
||
(
status
=
hash_update
(
&
hash
->
inner
,
hash
->
alg_id
,
pad2
,
sizeof
(
pad2
)
))
||
(
status
=
hash_finalize
(
hash
,
buf
+
len
,
len
)))
return
status
;
(
status
=
hash_finalize
(
hash
,
buf
+
len
)))
return
status
;
}
memcpy
(
key
,
buf
,
keylen
);
...
...
@@ -2219,7 +2218,7 @@ static NTSTATUS pbkdf2( struct hash *hash, UCHAR *pwd, ULONG pwd_len, UCHAR *sal
return
status
;
}
if
((
status
=
hash_finalize
(
hash
,
buf
,
hash_len
)))
if
((
status
=
hash_finalize
(
hash
,
buf
)))
{
free
(
buf
);
return
status
;
...
...
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