mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
crypto: hash - Export shash through hash
This patch allows shash algorithms to be used through the old hash interface. This is a transitional measure so we can convert the underlying algorithms to shash before converting the users across. Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
67cd080c50
commit
5f7082ed4f
7 changed files with 144 additions and 6 deletions
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
|
||||
#include <crypto/aead.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include <crypto/authenc.h>
|
||||
#include <crypto/scatterwalk.h>
|
||||
|
|
@ -431,6 +432,8 @@ static struct crypto_instance *crypto_authenc_alloc(struct rtattr **tb)
|
|||
inst->alg.cra_aead.ivsize = enc->cra_ablkcipher.ivsize;
|
||||
inst->alg.cra_aead.maxauthsize = auth->cra_type == &crypto_hash_type ?
|
||||
auth->cra_hash.digestsize :
|
||||
auth->cra_type ?
|
||||
__crypto_shash_alg(auth)->digestsize :
|
||||
auth->cra_digest.dia_digestsize;
|
||||
|
||||
inst->alg.cra_ctxsize = sizeof(struct crypto_authenc_ctx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue