From: Eric Biggers Date: Sun, 1 Dec 2019 21:53:25 +0000 (-0800) Subject: crypto: skcipher - add crypto_skcipher_min_keysize() X-Git-Tag: v5.6-rc1~152^2~187 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7bada03311b62288035b0f5454cc154a44f33c56;p=linux.git 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: Eric Biggers Signed-off-by: Herbert Xu --- diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index 8ebf4167632b..141e7690f9c3 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h @@ -368,6 +368,12 @@ static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, 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( struct crypto_skcipher *tfm) {