diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-07-30 03:53:01 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-09-21 03:41:50 +0200 |
commit | 6d7d684d635ac5a345f075015f2c84169c111c6a (patch) | |
tree | 9a1b397fe8db3c14cc69880aba747e50c1a1faa2 /crypto/digest.c | |
parent | [CRYPTO] s390: Added missing driver name and priority (diff) | |
download | linux-6d7d684d635ac5a345f075015f2c84169c111c6a.tar.xz linux-6d7d684d635ac5a345f075015f2c84169c111c6a.zip |
[CRYPTO] api: Added crypto_alloc_base
Up until now all crypto transforms have been of the same type, struct
crypto_tfm, regardless of whether they are ciphers, digests, or other
types. As a result of that, we check the types at run-time before
each crypto operation.
This is rather cumbersome. We could instead use different C types for
each crypto type to ensure that the correct types are used at compile
time. That is, we would have crypto_cipher/crypto_digest instead of
just crypto_tfm. The appropriate type would then be required for the
actual operations such as crypto_digest_digest.
Now that we have the type/mask fields when looking up algorithms, it
is easy to request for an algorithm of the precise type that the user
wants. However, crypto_alloc_tfm currently does not expose these new
attributes.
This patch introduces the function crypto_alloc_base which will carry
these new parameters. It will be renamed to crypto_alloc_tfm once
all existing users have been converted.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/digest.c')
0 files changed, 0 insertions, 0 deletions