diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-08-13 12:58:18 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-09-21 03:41:51 +0200 |
commit | f28776a369b12f9a03a822a8e1090ed670a41f4f (patch) | |
tree | b1eb08db2d7ad5c83a4b2784aea3af0502d127b3 /include/crypto/algapi.h | |
parent | [CRYPTO] api: Added crypto_type support (diff) | |
download | linux-f28776a369b12f9a03a822a8e1090ed670a41f4f.tar.xz linux-f28776a369b12f9a03a822a8e1090ed670a41f4f.zip |
[CRYPTO] cipher: Added encrypt_one/decrypt_one
This patch adds two new operations for the simple cipher that encrypts or
decrypts a single block at a time. This will be the main interface after
the existing block operations have moved over to the new block ciphers.
It also adds the crypto_cipher type which is currently only used on the
new operations but will be extended to setkey as well once existing users
have been converted to use block ciphers where applicable.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r-- | include/crypto/algapi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index c533c0a291af..6f9fb27b2071 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -69,5 +69,10 @@ static inline void *crypto_instance_ctx(struct crypto_instance *inst) return inst->__ctx; } +static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm) +{ + return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher; +} + #endif /* _CRYPTO_ALGAPI_H */ |