[CRYPTO] api: Added crypto_type support

This patch adds the crypto_type structure which will be used for all new
crypto algorithm types, beginning with block ciphers.

The primary purpose of this abstraction is to allow different crypto_type
objects for crypto algorithms of the same type, in particular, there will
be a different crypto_type objects for asynchronous algorithms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu 2006-08-22 00:06:54 +10:00
parent 8f21cf0d2b
commit e853c3cfa8
4 changed files with 38 additions and 10 deletions

View file

@ -15,6 +15,14 @@
#include <linux/crypto.h>
struct module;
struct seq_file;
struct crypto_type {
unsigned int (*ctxsize)(struct crypto_alg *alg);
int (*init)(struct crypto_tfm *tfm);
void (*exit)(struct crypto_tfm *tfm);
void (*show)(struct seq_file *m, struct crypto_alg *alg);
};
struct crypto_instance {
struct crypto_alg alg;