summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-19 22:24:23 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:46:17 +1000
commit055bcee3102dc35f019b69df9c2618e9d6dd1c09 (patch)
tree3f7c68abbbb5041d570e4cb8588f3943530bc0b7 /include/crypto
parent7226bc877a22244e8003924031435a4bffd52654 (diff)
downloadlinux-055bcee3102dc35f019b69df9c2618e9d6dd1c09.tar.gz
linux-055bcee3102dc35f019b69df9c2618e9d6dd1c09.tar.bz2
linux-055bcee3102dc35f019b69df9c2618e9d6dd1c09.zip
[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 {
};
extern const struct crypto_type crypto_blkcipher_type;
+extern const struct crypto_type crypto_hash_type;
void crypto_mod_put(struct crypto_alg *alg);
@@ -136,6 +137,11 @@ static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm)
return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher;
}
+static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm)
+{
+ return crypto_tfm_ctx_aligned(&tfm->base);
+}
+
static inline void blkcipher_walk_init(struct blkcipher_walk *walk,
struct scatterlist *dst,
struct scatterlist *src,