diff options
Diffstat (limited to 'include/crypto/algapi.h')
| -rw-r--r-- | include/crypto/algapi.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 60d06e784be3..010545436efa 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
| @@ -22,9 +22,18 @@ struct seq_file; | |||
| 22 | 22 | ||
| 23 | struct crypto_type { | 23 | struct crypto_type { |
| 24 | unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); | 24 | unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); |
| 25 | unsigned int (*extsize)(struct crypto_alg *alg, | ||
| 26 | const struct crypto_type *frontend); | ||
| 25 | int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); | 27 | int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); |
| 26 | void (*exit)(struct crypto_tfm *tfm); | 28 | int (*init_tfm)(struct crypto_tfm *tfm, |
| 29 | const struct crypto_type *frontend); | ||
| 27 | void (*show)(struct seq_file *m, struct crypto_alg *alg); | 30 | void (*show)(struct seq_file *m, struct crypto_alg *alg); |
| 31 | struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); | ||
| 32 | |||
| 33 | unsigned int type; | ||
| 34 | unsigned int maskclear; | ||
| 35 | unsigned int maskset; | ||
| 36 | unsigned int tfmsize; | ||
| 28 | }; | 37 | }; |
| 29 | 38 | ||
| 30 | struct crypto_instance { | 39 | struct crypto_instance { |
| @@ -239,6 +248,11 @@ static inline struct crypto_hash *crypto_spawn_hash(struct crypto_spawn *spawn) | |||
| 239 | return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask)); | 248 | return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask)); |
| 240 | } | 249 | } |
| 241 | 250 | ||
| 251 | static inline void *crypto_hash_ctx(struct crypto_hash *tfm) | ||
| 252 | { | ||
| 253 | return crypto_tfm_ctx(&tfm->base); | ||
| 254 | } | ||
| 255 | |||
| 242 | static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) | 256 | static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) |
| 243 | { | 257 | { |
| 244 | return crypto_tfm_ctx_aligned(&tfm->base); | 258 | return crypto_tfm_ctx_aligned(&tfm->base); |
