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
Nettle
nettle
Commits
e0c32627
Commit
e0c32627
authored
23 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Work in progress.
Rev: src/nettle/yarrow.h:1.2
parent
5d55afab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
yarrow.h
+31
-5
31 additions, 5 deletions
yarrow.h
with
31 additions
and
5 deletions
yarrow.h
+
31
−
5
View file @
e0c32627
...
@@ -26,20 +26,46 @@
...
@@ -26,20 +26,46 @@
#ifndef NETTLE_YARROW_COMPAT_H_INCLUDED
#ifndef NETTLE_YARROW_COMPAT_H_INCLUDED
#define NETTLE_YARROW_COMPAT_H_INCLUDED
#define NETTLE_YARROW_COMPAT_H_INCLUDED
#include
"sha1.h"
#include
"des.h"
enum
yarrow_pool_id
{
YARROW_FAST
=
0
,
YARROW_SLOW
=
1
};
struct
yarrow_source
{
uint32_t
estimate
;
/* The pool next sample should go to. */
enum
yarrow_pool_id
next
;
};
struct
yarrow160_ctx
struct
yarrow160_ctx
{
{
/* Indexed by yarrow_pool_id */
struct
sha1_ctx
pools
[
2
];
int
seeded
;
struct
des3_ctx
key
;
unsigned
nsources
;
struct
yarrow_source
*
sources
;
};
};
void
void
yarrow160_init
(
struct
*
yarrow160_ctx
);
yarrow160_init
(
struct
yarrow160_ctx
*
ctx
,
int
nsources
,
struct
yarrow_source
*
sources
);
void
void
yarrow160_update
(
struct
*
yarrow160_ctx
,
unsigned
length
,
const
uint8_t
*
data
);
yarrow160_update
(
struct
yarrow160_ctx
*
ctx
,
unsigned
source
,
unsigned
length
,
const
uint8_t
*
data
);
void
void
yarrow160_random
(
struct
*
yarrow160_ctx
,
unsigned
length
,
uint8_t
dst
);
yarrow160_random
(
struct
yarrow160_ctx
*
ctx
,
unsigned
length
,
uint8_t
dst
);
int
yarrow160_seeded
(
struct
yarrow160_ctx
*
ctx
);
unsigned
yarrow160_needed
(
struct
*
yarrow160_ctx
);
#endif
/* NETTLE_YARROW_COMPAT_H_INCLUDED */
#endif
/* NETTLE_YARROW_COMPAT_H_INCLUDED */
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