X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fmd4.c;h=3c19aa0750fdd2f19f135aec5f958a8b55c18d5a;hb=d1a35e4d74d070b06163e435e590ca90a2420b9e;hp=a2d6df5c0f8c69235f6ff4a2859627ac2123ecce;hpb=977127174a7dff52d17faeeb4c4949a54221881f;p=linux-2.6-omap-h63xx.git diff --git a/crypto/md4.c b/crypto/md4.c index a2d6df5c0f8..3c19aa0750f 100644 --- a/crypto/md4.c +++ b/crypto/md4.c @@ -152,9 +152,9 @@ static inline void md4_transform_helper(struct md4_ctx *ctx) md4_transform(ctx->hash, ctx->block); } -static void md4_init(void *ctx) +static void md4_init(struct crypto_tfm *tfm) { - struct md4_ctx *mctx = ctx; + struct md4_ctx *mctx = crypto_tfm_ctx(tfm); mctx->hash[0] = 0x67452301; mctx->hash[1] = 0xefcdab89; @@ -163,9 +163,9 @@ static void md4_init(void *ctx) mctx->byte_count = 0; } -static void md4_update(void *ctx, const u8 *data, unsigned int len) +static void md4_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) { - struct md4_ctx *mctx = ctx; + struct md4_ctx *mctx = crypto_tfm_ctx(tfm); const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); mctx->byte_count += len; @@ -193,9 +193,9 @@ static void md4_update(void *ctx, const u8 *data, unsigned int len) memcpy(mctx->block, data, len); } -static void md4_final(void *ctx, u8 *out) +static void md4_final(struct crypto_tfm *tfm, u8 *out) { - struct md4_ctx *mctx = ctx; + struct md4_ctx *mctx = crypto_tfm_ctx(tfm); const unsigned int offset = mctx->byte_count & 0x3f; char *p = (char *)mctx->block + offset; int padding = 56 - (offset + 1); @@ -233,18 +233,18 @@ static struct crypto_alg alg = { .dia_final = md4_final } } }; -static int __init init(void) +static int __init md4_mod_init(void) { return crypto_register_alg(&alg); } -static void __exit fini(void) +static void __exit md4_mod_fini(void) { crypto_unregister_alg(&alg); } -module_init(init); -module_exit(fini); +module_init(md4_mod_init); +module_exit(md4_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("MD4 Message Digest Algorithm");