diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-26 09:14:36 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-27 07:35:22 -0500 |
commit | a2d382a4f1ffea4f303d906cc63e4b99edc32c1a (patch) | |
tree | e3564b428e22fd84119a3c3eb4e4974efaa9ceec /include/crypto | |
parent | c1e9b3b0eea12899b7749571af21cc60822cf2b6 (diff) |
crypto: skcipher - Add helper to retrieve driver name
This patch adds the helper crypto_skcipher_driver_name which returns
the driver name of the alg object for a given tfm. This is needed by
ecryptfs.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/skcipher.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index f7a03a17bc1d..5bb70565b13a 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h | |||
@@ -231,6 +231,12 @@ static inline int crypto_has_skcipher(const char *alg_name, u32 type, | |||
231 | crypto_skcipher_mask(mask)); | 231 | crypto_skcipher_mask(mask)); |
232 | } | 232 | } |
233 | 233 | ||
234 | static inline const char *crypto_skcipher_driver_name( | ||
235 | struct crypto_skcipher *tfm) | ||
236 | { | ||
237 | return crypto_tfm_alg_name(crypto_skcipher_tfm(tfm)); | ||
238 | } | ||
239 | |||
234 | /** | 240 | /** |
235 | * crypto_skcipher_ivsize() - obtain IV size | 241 | * crypto_skcipher_ivsize() - obtain IV size |
236 | * @tfm: cipher handle | 242 | * @tfm: cipher handle |