chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: tidy up changes since 0.5.1
[secnet.git]
/
sha1.c
diff --git
a/sha1.c
b/sha1.c
index f442e08c91033c805e4c2987810021d507c40525..a78345a55f6378dc51d1bb67b3e2dab4eb8d404f 100644
(file)
--- a/
sha1.c
+++ b/
sha1.c
@@
-314,9
+314,11
@@
struct sha1 {
struct hash_if ops;
};
struct hash_if ops;
};
+static struct sha1 st[1];
+struct hash_if *const sha1_hash_if = &st->ops;
+
void sha1_module(dict_t *dict)
{
void sha1_module(dict_t *dict)
{
- struct sha1 *st;
cstring_t testinput="abcdbcdecdefdefgefghfghigh"
"ijhijkijkljklmklmnlmnomnopnopq";
uint8_t expected[20]=
cstring_t testinput="abcdbcdecdefdefgefghfghigh"
"ijhijkijkljklmklmnlmnomnopnopq";
uint8_t expected[20]=
@@
-328,7
+330,6
@@
void sha1_module(dict_t *dict)
uint8_t digest[20];
int i;
uint8_t digest[20];
int i;
- NEW(st);
st->cl.description="sha1";
st->cl.type=CL_HASH;
st->cl.apply=NULL;
st->cl.description="sha1";
st->cl.type=CL_HASH;
st->cl.apply=NULL;