]> Git Repo - linux.git/blobdiff - include/crypto/algapi.h
mm: invoke oom-killer from page fault
[linux.git] / include / crypto / algapi.h
index fda1759ffe2d95e915cdaba3a6298d3b609d0dc6..010545436efa22593f4a124c9a68849f78a85872 100644 (file)
@@ -22,9 +22,18 @@ struct seq_file;
 
 struct crypto_type {
        unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
+       unsigned int (*extsize)(struct crypto_alg *alg,
+                               const struct crypto_type *frontend);
        int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
-       void (*exit)(struct crypto_tfm *tfm);
+       int (*init_tfm)(struct crypto_tfm *tfm,
+                       const struct crypto_type *frontend);
        void (*show)(struct seq_file *m, struct crypto_alg *alg);
+       struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);
+
+       unsigned int type;
+       unsigned int maskclear;
+       unsigned int maskset;
+       unsigned int tfmsize;
 };
 
 struct crypto_instance {
@@ -198,14 +207,6 @@ static inline struct crypto_instance *crypto_aead_alg_instance(
        return crypto_tfm_alg_instance(&aead->base);
 }
 
-static inline struct crypto_ablkcipher *crypto_spawn_ablkcipher(
-       struct crypto_spawn *spawn)
-{
-       return __crypto_ablkcipher_cast(
-               crypto_spawn_tfm(spawn, crypto_skcipher_type(0),
-                                crypto_skcipher_mask(0)));
-}
-
 static inline struct crypto_blkcipher *crypto_spawn_blkcipher(
        struct crypto_spawn *spawn)
 {
@@ -247,6 +248,11 @@ static inline struct crypto_hash *crypto_spawn_hash(struct crypto_spawn *spawn)
        return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask));
 }
 
+static inline void *crypto_hash_ctx(struct crypto_hash *tfm)
+{
+       return crypto_tfm_ctx(&tfm->base);
+}
+
 static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm)
 {
        return crypto_tfm_ctx_aligned(&tfm->base);
This page took 0.032139 seconds and 4 git commands to generate.