summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-21 09:11:05 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-22 05:25:53 +0200
commitf569525911d3dce024ff2b1908e16a20e9052338 (patch)
treeeac211e0e2cf5d849927b1ea5d421c8512489163 /include/crypto
parentcrypto: caam - Use old_aead_alg (diff)
downloadlinux-f569525911d3dce024ff2b1908e16a20e9052338.tar.xz
linux-f569525911d3dce024ff2b1908e16a20e9052338.zip
crypto: aead - Add crypto_aead_maxauthsize
This patch adds the helper crypto_aead_maxauthsize to remove the need to directly dereference aead_alg internals by AEAD implementors. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/aead.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h
index 84c17bb92b6a..4614f795f8bc 100644
--- a/include/crypto/internal/aead.h
+++ b/include/crypto/internal/aead.h
@@ -119,5 +119,10 @@ static inline void crypto_aead_set_reqsize(struct crypto_aead *aead,
crypto_aead_crt(aead)->reqsize = reqsize;
}
+static inline unsigned int crypto_aead_maxauthsize(struct crypto_aead *aead)
+{
+ return crypto_old_aead_alg(aead)->maxauthsize;
+}
+
#endif /* _CRYPTO_INTERNAL_AEAD_H */