From: Herbert Xu Date: Thu, 21 May 2015 07:11:05 +0000 (+0800) Subject: crypto: aead - Add crypto_aead_maxauthsize X-Git-Tag: v4.2-rc1~160^2~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f569525911d3dce024ff2b1908e16a20e9052338;p=platform%2Fkernel%2Flinux-exynos.git 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 --- diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h index 84c17bb..4614f79 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 */