Sfoglia il codice sorgente

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>
Herbert Xu 10 anni fa
parent
commit
f569525911
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      include/crypto/internal/aead.h

+ 5 - 0
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 */