aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crypto_null.c')
-rw-r--r--crypto/crypto_null.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c
index 3fcf6e887e87..a0d956b52949 100644
--- a/crypto/crypto_null.c
+++ b/crypto/crypto_null.c
@@ -27,8 +27,8 @@
27#define NULL_BLOCK_SIZE 1 27#define NULL_BLOCK_SIZE 1
28#define NULL_DIGEST_SIZE 0 28#define NULL_DIGEST_SIZE 0
29 29
30static int null_compress(void *ctx, const u8 *src, unsigned int slen, 30static int null_compress(struct crypto_tfm *tfm, const u8 *src,
31 u8 *dst, unsigned int *dlen) 31 unsigned int slen, u8 *dst, unsigned int *dlen)
32{ 32{
33 if (slen > *dlen) 33 if (slen > *dlen)
34 return -EINVAL; 34 return -EINVAL;
@@ -37,20 +37,21 @@ static int null_compress(void *ctx, const u8 *src, unsigned int slen,
37 return 0; 37 return 0;
38} 38}
39 39
40static void null_init(void *ctx) 40static void null_init(struct crypto_tfm *tfm)
41{ } 41{ }
42 42
43static void null_update(void *ctx, const u8 *data, unsigned int len) 43static void null_update(struct crypto_tfm *tfm, const u8 *data,
44 unsigned int len)
44{ } 45{ }
45 46
46static void null_final(void *ctx, u8 *out) 47static void null_final(struct crypto_tfm *tfm, u8 *out)
47{ } 48{ }
48 49
49static int null_setkey(void *ctx, const u8 *key, 50static int null_setkey(struct crypto_tfm *tfm, const u8 *key,
50 unsigned int keylen, u32 *flags) 51 unsigned int keylen, u32 *flags)
51{ return 0; } 52{ return 0; }
52 53
53static void null_crypt(void *ctx, u8 *dst, const u8 *src) 54static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
54{ 55{
55 memcpy(dst, src, NULL_BLOCK_SIZE); 56 memcpy(dst, src, NULL_BLOCK_SIZE);
56} 57}