Commit 7bada033 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

crypto: skcipher - add crypto_skcipher_min_keysize()

Add a helper function crypto_skcipher_min_keysize() to mirror
crypto_skcipher_max_keysize().

This will be used by the self-tests.
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 095be695
...@@ -368,6 +368,12 @@ static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, ...@@ -368,6 +368,12 @@ static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm,
return crypto_skcipher_setkey(&tfm->base, key, keylen); return crypto_skcipher_setkey(&tfm->base, key, keylen);
} }
static inline unsigned int crypto_skcipher_min_keysize(
struct crypto_skcipher *tfm)
{
return crypto_skcipher_alg(tfm)->min_keysize;
}
static inline unsigned int crypto_skcipher_max_keysize( static inline unsigned int crypto_skcipher_max_keysize(
struct crypto_skcipher *tfm) struct crypto_skcipher *tfm)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment