diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 2da6ad4f3593..60acad9788c5 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -83,8 +83,7 @@ static inline void crypto_exit_proc(void) | |||
83 | { } | 83 | { } |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, | 86 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg) |
87 | int flags) | ||
88 | { | 87 | { |
89 | unsigned int len = alg->cra_ctxsize; | 88 | unsigned int len = alg->cra_ctxsize; |
90 | 89 | ||
@@ -96,23 +95,12 @@ static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, | |||
96 | return len; | 95 | return len; |
97 | } | 96 | } |
98 | 97 | ||
99 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, | 98 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg) |
100 | int flags) | ||
101 | { | 99 | { |
102 | unsigned int len = alg->cra_ctxsize; | 100 | return alg->cra_ctxsize; |
103 | |||
104 | switch (flags & CRYPTO_TFM_MODE_MASK) { | ||
105 | case CRYPTO_TFM_MODE_CBC: | ||
106 | len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1); | ||
107 | len += alg->cra_blocksize; | ||
108 | break; | ||
109 | } | ||
110 | |||
111 | return len; | ||
112 | } | 101 | } |
113 | 102 | ||
114 | static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg, | 103 | static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) |
115 | int flags) | ||
116 | { | 104 | { |
117 | return alg->cra_ctxsize; | 105 | return alg->cra_ctxsize; |
118 | } | 106 | } |
@@ -121,10 +109,6 @@ struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); | |||
121 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); | 109 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); |
122 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); | 110 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); |
123 | 111 | ||
124 | int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags); | ||
125 | int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags); | ||
126 | int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags); | ||
127 | |||
128 | int crypto_init_digest_ops(struct crypto_tfm *tfm); | 112 | int crypto_init_digest_ops(struct crypto_tfm *tfm); |
129 | int crypto_init_cipher_ops(struct crypto_tfm *tfm); | 113 | int crypto_init_cipher_ops(struct crypto_tfm *tfm); |
130 | int crypto_init_compress_ops(struct crypto_tfm *tfm); | 114 | int crypto_init_compress_ops(struct crypto_tfm *tfm); |
@@ -136,7 +120,8 @@ void crypto_exit_compress_ops(struct crypto_tfm *tfm); | |||
136 | void crypto_larval_error(const char *name, u32 type, u32 mask); | 120 | void crypto_larval_error(const char *name, u32 type, u32 mask); |
137 | 121 | ||
138 | void crypto_shoot_alg(struct crypto_alg *alg); | 122 | void crypto_shoot_alg(struct crypto_alg *alg); |
139 | struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 flags); | 123 | struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, |
124 | u32 mask); | ||
140 | 125 | ||
141 | int crypto_register_instance(struct crypto_template *tmpl, | 126 | int crypto_register_instance(struct crypto_template *tmpl, |
142 | struct crypto_instance *inst); | 127 | struct crypto_instance *inst); |