#define rol(x,y) ( ((x) << (y)) | (((uint32)x) >> (32-y)) )
-void SHA_Core_Init(uint32 h[5])
+static void SHA_Core_Init(uint32 h[5])
{
h[0] = 0x67452301;
h[1] = 0xefcdab89;
static void *sha1_make_context(void)
{
- return smalloc(2*sizeof(SHA_State));
+ return snewn(2, SHA_State);
}
static void sha1_free_context(void *handle)
sha1_make_context, sha1_free_context, sha1_key,
sha1_generate, sha1_verify,
"hmac-sha1",
- 20
+ 20,
+ "HMAC-SHA1"
};
const struct ssh_mac ssh_sha1_buggy = {
sha1_make_context, sha1_free_context, sha1_key_buggy,
sha1_generate, sha1_verify,
"hmac-sha1",
- 20
+ 20,
+ "bug-compatible HMAC-SHA1"
};