diff options
author | Mathias Krause <mathias.krause@secunet.com> | 2013-10-15 07:49:30 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-10-16 08:56:25 -0400 |
commit | bc6e2bdb71056607141ada309a185f0a50b1aeaf (patch) | |
tree | b415b0fcd9ff36db748b921862936f90323606f0 /include | |
parent | 6d3aab4ebeca2b9a5e0a2681e0f99ce6dda8a4c2 (diff) |
crypto: authenc - Export key parsing helper function
AEAD key parsing is duplicated to multiple places in the kernel. Add a
common helper function to consolidate that functionality.
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/authenc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/crypto/authenc.h b/include/crypto/authenc.h index e47b044929a8..6775059539b5 100644 --- a/include/crypto/authenc.h +++ b/include/crypto/authenc.h | |||
@@ -23,5 +23,15 @@ struct crypto_authenc_key_param { | |||
23 | __be32 enckeylen; | 23 | __be32 enckeylen; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | #endif /* _CRYPTO_AUTHENC_H */ | 26 | struct crypto_authenc_keys { |
27 | const u8 *authkey; | ||
28 | const u8 *enckey; | ||
29 | |||
30 | unsigned int authkeylen; | ||
31 | unsigned int enckeylen; | ||
32 | }; | ||
27 | 33 | ||
34 | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, | ||
35 | unsigned int keylen); | ||
36 | |||
37 | #endif /* _CRYPTO_AUTHENC_H */ | ||