summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
686e21a)
This will be useful in a moment.
As a side effect, the sha1 st is statically allocated now.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
+extern struct hash_if *const sha1_hash_if; /* for where this is hardcoded */
+
/* BUFFER interface */
struct buffer_if {
/* BUFFER interface */
struct buffer_if {
+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)
{
cstring_t testinput="abcdbcdecdefdefgefghfghigh"
"ijhijkijkljklmklmnlmnomnopnopq";
uint8_t expected[20]=
cstring_t testinput="abcdbcdecdefdefgefghfghigh"
"ijhijkijkljklmklmnlmnomnopnopq";
uint8_t expected[20]=
uint8_t digest[20];
int i;
uint8_t digest[20];
int i;
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;