diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-03 10:25:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-03 10:25:08 -0400 |
commit | 0a1340c185734a57fbf4775927966ad4a1347b02 (patch) | |
tree | d9ed8f0dd809a7c542a3356601125ea5b5aaa804 /include/linux/crypto.h | |
parent | af18ddb8864b096e3ed4732e2d4b21c956dcfe3a (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge rsync://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/linux/kernel.h
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0ab1bc1152ca..7f946241b879 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #ifndef _LINUX_CRYPTO_H | 17 | #ifndef _LINUX_CRYPTO_H |
18 | #define _LINUX_CRYPTO_H | 18 | #define _LINUX_CRYPTO_H |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
@@ -67,7 +66,7 @@ struct crypto_tfm; | |||
67 | 66 | ||
68 | struct cipher_desc { | 67 | struct cipher_desc { |
69 | struct crypto_tfm *tfm; | 68 | struct crypto_tfm *tfm; |
70 | void (*crfn)(void *ctx, u8 *dst, const u8 *src); | 69 | void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
71 | unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, | 70 | unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, |
72 | const u8 *src, unsigned int nbytes); | 71 | const u8 *src, unsigned int nbytes); |
73 | void *info; | 72 | void *info; |
@@ -80,10 +79,10 @@ struct cipher_desc { | |||
80 | struct cipher_alg { | 79 | struct cipher_alg { |
81 | unsigned int cia_min_keysize; | 80 | unsigned int cia_min_keysize; |
82 | unsigned int cia_max_keysize; | 81 | unsigned int cia_max_keysize; |
83 | int (*cia_setkey)(void *ctx, const u8 *key, | 82 | int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, |
84 | unsigned int keylen, u32 *flags); | 83 | unsigned int keylen, u32 *flags); |
85 | void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); | 84 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
86 | void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); | 85 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
87 | 86 | ||
88 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | 87 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, |
89 | u8 *dst, const u8 *src, | 88 | u8 *dst, const u8 *src, |
@@ -101,20 +100,19 @@ struct cipher_alg { | |||
101 | 100 | ||
102 | struct digest_alg { | 101 | struct digest_alg { |
103 | unsigned int dia_digestsize; | 102 | unsigned int dia_digestsize; |
104 | void (*dia_init)(void *ctx); | 103 | void (*dia_init)(struct crypto_tfm *tfm); |
105 | void (*dia_update)(void *ctx, const u8 *data, unsigned int len); | 104 | void (*dia_update)(struct crypto_tfm *tfm, const u8 *data, |
106 | void (*dia_final)(void *ctx, u8 *out); | 105 | unsigned int len); |
107 | int (*dia_setkey)(void *ctx, const u8 *key, | 106 | void (*dia_final)(struct crypto_tfm *tfm, u8 *out); |
107 | int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key, | ||
108 | unsigned int keylen, u32 *flags); | 108 | unsigned int keylen, u32 *flags); |
109 | }; | 109 | }; |
110 | 110 | ||
111 | struct compress_alg { | 111 | struct compress_alg { |
112 | int (*coa_init)(void *ctx); | 112 | int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, |
113 | void (*coa_exit)(void *ctx); | 113 | unsigned int slen, u8 *dst, unsigned int *dlen); |
114 | int (*coa_compress)(void *ctx, const u8 *src, unsigned int slen, | 114 | int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src, |
115 | u8 *dst, unsigned int *dlen); | 115 | unsigned int slen, u8 *dst, unsigned int *dlen); |
116 | int (*coa_decompress)(void *ctx, const u8 *src, unsigned int slen, | ||
117 | u8 *dst, unsigned int *dlen); | ||
118 | }; | 116 | }; |
119 | 117 | ||
120 | #define cra_cipher cra_u.cipher | 118 | #define cra_cipher cra_u.cipher |
@@ -130,14 +128,17 @@ struct crypto_alg { | |||
130 | 128 | ||
131 | int cra_priority; | 129 | int cra_priority; |
132 | 130 | ||
133 | const char cra_name[CRYPTO_MAX_ALG_NAME]; | 131 | char cra_name[CRYPTO_MAX_ALG_NAME]; |
134 | const char cra_driver_name[CRYPTO_MAX_ALG_NAME]; | 132 | char cra_driver_name[CRYPTO_MAX_ALG_NAME]; |
135 | 133 | ||
136 | union { | 134 | union { |
137 | struct cipher_alg cipher; | 135 | struct cipher_alg cipher; |
138 | struct digest_alg digest; | 136 | struct digest_alg digest; |
139 | struct compress_alg compress; | 137 | struct compress_alg compress; |
140 | } cra_u; | 138 | } cra_u; |
139 | |||
140 | int (*cra_init)(struct crypto_tfm *tfm); | ||
141 | void (*cra_exit)(struct crypto_tfm *tfm); | ||
141 | 142 | ||
142 | struct module *cra_module; | 143 | struct module *cra_module; |
143 | }; | 144 | }; |