diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-08-19 14:24:23 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-09-21 03:46:17 +0200 |
commit | 055bcee3102dc35f019b69df9c2618e9d6dd1c09 (patch) | |
tree | 3f7c68abbbb5041d570e4cb8588f3943530bc0b7 /include/crypto/algapi.h | |
parent | [CRYPTO] api: Mark parts of cipher interface as deprecated (diff) | |
download | linux-055bcee3102dc35f019b69df9c2618e9d6dd1c09.tar.xz 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/algapi.h')
-rw-r--r-- | include/crypto/algapi.h | 6 |
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, |