Skip to content

Commit

Permalink
crypto: skcipher - Add helper to retrieve driver name
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
herbertx committed Jan 27, 2016
1 parent c1e9b3b commit a2d382a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/crypto/skcipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ static inline int crypto_has_skcipher(const char *alg_name, u32 type,
crypto_skcipher_mask(mask));
}

static inline const char *crypto_skcipher_driver_name(
struct crypto_skcipher *tfm)
{
return crypto_tfm_alg_name(crypto_skcipher_tfm(tfm));
}

/**
* crypto_skcipher_ivsize() - obtain IV size
* @tfm: cipher handle
Expand Down

0 comments on commit a2d382a

Please sign in to comment.