diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-14 08:21:46 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-14 08:21:46 -0400 |
commit | 4dc10c0142ce0af8c20ec44dc6928ae63ad4f73a (patch) | |
tree | 0554a3c5210e86f0cf4ada5b370f500f687d3514 /include/crypto | |
parent | 0b535adfb102bac1edb046444172b6b77d99bc92 (diff) |
crypto: crypto4xx - Switch to new style ahash
This patch changes crypto4xx to use the new style ahash type.
In particular, we now use ahash_alg to define ahash algorithms
instead of crypto_alg.
This is achieved by introducing a union that encapsulates the
new type and the existing crypto_alg structure. They're told
apart through a u32 field containing the type value.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/internal/hash.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h index 9d30316e9f10..e3a82514d61e 100644 --- a/include/crypto/internal/hash.h +++ b/include/crypto/internal/hash.h | |||
@@ -103,6 +103,12 @@ static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) | |||
103 | return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); | 103 | return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); |
104 | } | 104 | } |
105 | 105 | ||
106 | static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg) | ||
107 | { | ||
108 | return container_of(__crypto_hash_alg_common(alg), struct ahash_alg, | ||
109 | halg); | ||
110 | } | ||
111 | |||
106 | static inline struct old_ahash_alg *crypto_old_ahash_alg( | 112 | static inline struct old_ahash_alg *crypto_old_ahash_alg( |
107 | struct crypto_ahash *tfm) | 113 | struct crypto_ahash *tfm) |
108 | { | 114 | { |