2014-04-16 Niels Möller <nisse@lysator.liu.se>
+ * sha3-224.c (sha3_224_init): Pass pointer to context struct, not
+ pointer to first element, to memset.
+ * sha3-256.c (sha3_256_init): Likewise.
+ * sha3-384.c (sha3_384_init): Likewise.
+ * sha3-512.c (sha3_512_init): Likewise.
+
* examples/eratosthenes.c (vector_alloc): Use sizeof(*vector)
instead of explicit type in malloc call.
(vector_init): Make constant explicitly unsigned long.
void
sha3_224_init (struct sha3_224_ctx *ctx)
{
- memset (&ctx->state, 0, offsetof (struct sha3_224_ctx, block));
+ memset (ctx, 0, offsetof (struct sha3_224_ctx, block));
}
void
void
sha3_256_init (struct sha3_256_ctx *ctx)
{
- memset (&ctx->state, 0, offsetof (struct sha3_256_ctx, block));
+ memset (ctx, 0, offsetof (struct sha3_256_ctx, block));
}
void
void
sha3_384_init (struct sha3_384_ctx *ctx)
{
- memset (&ctx->state, 0, offsetof (struct sha3_384_ctx, block));
+ memset (ctx, 0, offsetof (struct sha3_384_ctx, block));
}
void
void
sha3_512_init (struct sha3_512_ctx *ctx)
{
- memset (&ctx->state, 0, offsetof (struct sha3_512_ctx, block));
+ memset (ctx, 0, offsetof (struct sha3_512_ctx, block));
}
void