Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Brian Smith
nettle
Commits
95ce5d75
Commit
95ce5d75
authored
11 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Use size_t for pbkdf2.
parent
c15a79d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pbkdf2-hmac-sha1.c
+3
-3
3 additions, 3 deletions
pbkdf2-hmac-sha1.c
pbkdf2-hmac-sha256.c
+4
-4
4 additions, 4 deletions
pbkdf2-hmac-sha256.c
pbkdf2.c
+3
-3
3 additions, 3 deletions
pbkdf2.c
pbkdf2.h
+9
-9
9 additions, 9 deletions
pbkdf2.h
with
19 additions
and
19 deletions
pbkdf2-hmac-sha1.c
+
3
−
3
View file @
95ce5d75
...
...
@@ -32,10 +32,10 @@
#include
"hmac.h"
void
pbkdf2_hmac_sha1
(
unsigned
key_length
,
const
uint8_t
*
key
,
pbkdf2_hmac_sha1
(
size_t
key_length
,
const
uint8_t
*
key
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
)
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
)
{
struct
hmac_sha1_ctx
sha1ctx
;
...
...
This diff is collapsed.
Click to expand it.
pbkdf2-hmac-sha256.c
+
4
−
4
View file @
95ce5d75
...
...
@@ -32,10 +32,10 @@
#include
"hmac.h"
void
pbkdf2_hmac_sha256
(
unsigned
key_length
,
const
uint8_t
*
key
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
)
pbkdf2_hmac_sha256
(
size_t
key_length
,
const
uint8_t
*
key
,
unsigned
iterations
,
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
)
{
struct
hmac_sha256_ctx
sha256ctx
;
...
...
This diff is collapsed.
Click to expand it.
pbkdf2.c
+
3
−
3
View file @
95ce5d75
...
...
@@ -41,9 +41,9 @@ void
pbkdf2
(
void
*
mac_ctx
,
nettle_hash_update_func
*
update
,
nettle_hash_digest_func
*
digest
,
unsigned
digest_size
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
)
size_t
digest_size
,
unsigned
iterations
,
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
)
{
TMP_DECL
(
U
,
uint8_t
,
NETTLE_MAX_HASH_DIGEST_SIZE
);
TMP_DECL
(
T
,
uint8_t
,
NETTLE_MAX_HASH_DIGEST_SIZE
);
...
...
This diff is collapsed.
Click to expand it.
pbkdf2.h
+
9
−
9
View file @
95ce5d75
...
...
@@ -42,9 +42,9 @@ void
pbkdf2
(
void
*
mac_ctx
,
nettle_hash_update_func
*
update
,
nettle_hash_digest_func
*
digest
,
unsigned
digest_size
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
);
size_t
digest_size
,
unsigned
iterations
,
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
);
#define PBKDF2(ctx, update, digest, digest_size, \
iterations, salt_length, salt, length, dst) \
...
...
@@ -59,16 +59,16 @@ pbkdf2 (void *mac_ctx,
/* PBKDF2 with specific PRFs. */
void
pbkdf2_hmac_sha1
(
unsigned
key_length
,
const
uint8_t
*
key
,
pbkdf2_hmac_sha1
(
size_t
key_length
,
const
uint8_t
*
key
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
);
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
);
void
pbkdf2_hmac_sha256
(
unsigned
key_length
,
const
uint8_t
*
key
,
pbkdf2_hmac_sha256
(
size_t
key_length
,
const
uint8_t
*
key
,
unsigned
iterations
,
unsigned
salt_length
,
const
uint8_t
*
salt
,
unsigned
length
,
uint8_t
*
dst
);
size_t
salt_length
,
const
uint8_t
*
salt
,
size_t
length
,
uint8_t
*
dst
);
#ifdef __cplusplus
}
...
...
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