ide/ppc/pmac.c: add MODULE_LICENSE
[sfrench/cifs-2.6.git] / crypto / md5.c
index 7f041aef5da23640d85d0b350938bddf87db2243..93d18e8b3d53d708e9ea23460eab231a18904796 100644 (file)
@@ -147,9 +147,9 @@ static inline void md5_transform_helper(struct md5_ctx *ctx)
        md5_transform(ctx->hash, ctx->block);
 }
 
-static void md5_init(void *ctx)
+static void md5_init(struct crypto_tfm *tfm)
 {
-       struct md5_ctx *mctx = ctx;
+       struct md5_ctx *mctx = crypto_tfm_ctx(tfm);
 
        mctx->hash[0] = 0x67452301;
        mctx->hash[1] = 0xefcdab89;
@@ -158,9 +158,9 @@ static void md5_init(void *ctx)
        mctx->byte_count = 0;
 }
 
-static void md5_update(void *ctx, const u8 *data, unsigned int len)
+static void md5_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len)
 {
-       struct md5_ctx *mctx = ctx;
+       struct md5_ctx *mctx = crypto_tfm_ctx(tfm);
        const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
 
        mctx->byte_count += len;
@@ -188,9 +188,9 @@ static void md5_update(void *ctx, const u8 *data, unsigned int len)
        memcpy(mctx->block, data, len);
 }
 
-static void md5_final(void *ctx, u8 *out)
+static void md5_final(struct crypto_tfm *tfm, u8 *out)
 {
-       struct md5_ctx *mctx = ctx;
+       struct md5_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);