summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-13 20:58:18 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:41:51 +1000
commitf28776a369b12f9a03a822a8e1090ed670a41f4f (patch)
treeb1eb08db2d7ad5c83a4b2784aea3af0502d127b3 /include/crypto
parente853c3cfa8cc24869ecd2526e589bcb176bc12e9 (diff)
downloadtalos-op-linux-f28776a369b12f9a03a822a8e1090ed670a41f4f.tar.gz
talos-op-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')
-rw-r--r--include/crypto/algapi.h5
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 */
OpenPOWER on IntegriCloud