* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
+ * [I interpet this as a blanket permision -iwj.]
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof *ctx); /* In case it's sensitive */
}
#ifndef ASM_MD5
{
struct MD5Context *ctx;
- ctx=safe_malloc(sizeof(*ctx),"md5_init");
+ NEW(ctx);
MD5Init(ctx);
return ctx;
uint8_t digest[16];
int i;
- st=safe_malloc(sizeof(*st),"md5_module");
+ NEW(st);
st->cl.description="md5";
st->cl.type=CL_HASH;
st->cl.apply=NULL;