diff options
Diffstat (limited to 'crypto/md4.c')
-rw-r--r-- | crypto/md4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/md4.c b/crypto/md4.c index a2d6df5c0f8c..c1bc71bdc16b 100644 --- a/crypto/md4.c +++ b/crypto/md4.c | |||
@@ -152,9 +152,9 @@ static inline void md4_transform_helper(struct md4_ctx *ctx) | |||
152 | md4_transform(ctx->hash, ctx->block); | 152 | md4_transform(ctx->hash, ctx->block); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void md4_init(void *ctx) | 155 | static void md4_init(struct crypto_tfm *tfm) |
156 | { | 156 | { |
157 | struct md4_ctx *mctx = ctx; | 157 | struct md4_ctx *mctx = crypto_tfm_ctx(tfm); |
158 | 158 | ||
159 | mctx->hash[0] = 0x67452301; | 159 | mctx->hash[0] = 0x67452301; |
160 | mctx->hash[1] = 0xefcdab89; | 160 | mctx->hash[1] = 0xefcdab89; |
@@ -163,9 +163,9 @@ static void md4_init(void *ctx) | |||
163 | mctx->byte_count = 0; | 163 | mctx->byte_count = 0; |
164 | } | 164 | } |
165 | 165 | ||
166 | static void md4_update(void *ctx, const u8 *data, unsigned int len) | 166 | static void md4_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) |
167 | { | 167 | { |
168 | struct md4_ctx *mctx = ctx; | 168 | struct md4_ctx *mctx = crypto_tfm_ctx(tfm); |
169 | const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); | 169 | const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); |
170 | 170 | ||
171 | mctx->byte_count += len; | 171 | mctx->byte_count += len; |
@@ -193,9 +193,9 @@ static void md4_update(void *ctx, const u8 *data, unsigned int len) | |||
193 | memcpy(mctx->block, data, len); | 193 | memcpy(mctx->block, data, len); |
194 | } | 194 | } |
195 | 195 | ||
196 | static void md4_final(void *ctx, u8 *out) | 196 | static void md4_final(struct crypto_tfm *tfm, u8 *out) |
197 | { | 197 | { |
198 | struct md4_ctx *mctx = ctx; | 198 | struct md4_ctx *mctx = crypto_tfm_ctx(tfm); |
199 | const unsigned int offset = mctx->byte_count & 0x3f; | 199 | const unsigned int offset = mctx->byte_count & 0x3f; |
200 | char *p = (char *)mctx->block + offset; | 200 | char *p = (char *)mctx->block + offset; |
201 | int padding = 56 - (offset + 1); | 201 | int padding = 56 - (offset + 1); |