aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-19 08:24:23 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-20 21:46:17 -0400
commit055bcee3102dc35f019b69df9c2618e9d6dd1c09 (patch)
tree3f7c68abbbb5041d570e4cb8588f3943530bc0b7 /include/crypto
parent7226bc877a22244e8003924031435a4bffd52654 (diff)
[CRYPTO] digest: Added user API for new hash type
The existing digest user interface is inadequate for support asynchronous operations. For one it doesn't return a value to indicate success or failure, nor does it take a per-operation descriptor which is essential for the issuing of requests while other requests are still outstanding. This patch is the first in a series of steps to remodel the interface for asynchronous operations. For the ease of transition the new interface will be known as "hash" while the old one will remain as "digest". This patch also changes sg_next to allow chaining. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/algapi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 444f602724db..5748aecdb414 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -82,6 +82,7 @@ struct blkcipher_walk {
82}; 82};
83 83
84extern const struct crypto_type crypto_blkcipher_type; 84extern const struct crypto_type crypto_blkcipher_type;
85extern const struct crypto_type crypto_hash_type;
85 86
86void crypto_mod_put(struct crypto_alg *alg); 87void crypto_mod_put(struct crypto_alg *alg);
87 88
@@ -136,6 +137,11 @@ static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm)
136 return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher; 137 return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher;
137} 138}
138 139
140static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm)
141{
142 return crypto_tfm_ctx_aligned(&tfm->base);
143}
144
139static inline void blkcipher_walk_init(struct blkcipher_walk *walk, 145static inline void blkcipher_walk_init(struct blkcipher_walk *walk,
140 struct scatterlist *dst, 146 struct scatterlist *dst,
141 struct scatterlist *src, 147 struct scatterlist *src,