diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-07-30 11:53:01 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-09-21 11:41:50 +1000 |
commit | c8af672a12f9ea7b28815e30a8a24142d529c5ba (patch) | |
tree | 2b9dff45fb94404e6bb9f86b5d589ccc26bad120 /crypto/cipher.c | |
parent | fed261cd8213688800a9b527eb4db5a38dc094fa (diff) | |
download | linux-crypto-c8af672a12f9ea7b28815e30a8a24142d529c5ba.tar.gz linux-crypto-c8af672a12f9ea7b28815e30a8a24142d529c5ba.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/cipher.c')
0 files changed, 0 insertions, 0 deletions