]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: aead - move crypto_aead_maxauthsize() to <crypto/aead.h>
authorEric Biggers <ebiggers@google.com>
Sun, 1 Dec 2019 21:53:24 +0000 (13:53 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:37:00 +0000 (16:37 +0800)
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>
include/crypto/aead.h
include/crypto/internal/aead.h

index a3bdadf6221ee9d7f9eef709dae5c44841b2bb3f..1b3ebe8593c056f1499ba646b4d175f02dfe792b 100644 (file)
@@ -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
index c509ec30fc65f4b88aa13d376be9f8353052db58..374185a7567fb01a9894bee8f3064e311fcf51fe 100644 (file)
@@ -113,16 +113,6 @@ static inline void crypto_aead_set_reqsize(struct crypto_aead *aead,
        aead->reqsize = reqsize;
 }
 
-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));
-}
-
 static inline void aead_init_queue(struct aead_queue *queue,
                                   unsigned int max_qlen)
 {