summaryrefslogtreecommitdiffstats
path: root/include/crypto/aead.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-01 22:53:24 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 09:37:00 +0100
commit095be695e564d1c64d33327b03e32bf5749b1174 (patch)
tree55295f0ad516c099fb8e0def32f3ec4925480adf /include/crypto/aead.h
parentcrypto: omap-crypto - copy the temporary data to output buffer properly (diff)
downloadlinux-095be695e564d1c64d33327b03e32bf5749b1174.tar.xz
linux-095be695e564d1c64d33327b03e32bf5749b1174.zip
crypto: aead - move crypto_aead_maxauthsize() to <crypto/aead.h>
Move crypto_aead_maxauthsize() to <crypto/aead.h> so that it's available to users of the API, not just AEAD implementations. This will be used by the self-tests. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/aead.h')
-rw-r--r--include/crypto/aead.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/crypto/aead.h b/include/crypto/aead.h
index a3bdadf6221e..1b3ebe8593c0 100644
--- a/include/crypto/aead.h
+++ b/include/crypto/aead.h
@@ -227,6 +227,16 @@ static inline unsigned int crypto_aead_authsize(struct crypto_aead *tfm)
return tfm->authsize;
}
+static inline unsigned int crypto_aead_alg_maxauthsize(struct aead_alg *alg)
+{
+ return alg->maxauthsize;
+}
+
+static inline unsigned int crypto_aead_maxauthsize(struct crypto_aead *aead)
+{
+ return crypto_aead_alg_maxauthsize(crypto_aead_alg(aead));
+}
+
/**
* crypto_aead_blocksize() - obtain block size of cipher
* @tfm: cipher handle