[CRYPTO] digest: Add alignment handling

Some hash modules load/store data words directly.  The digest layer
should pass properly aligned buffer to update()/final() method.  This
patch also add cra_alignmask to some hash modules.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Atsushi Nemoto
2006-04-10 08:42:35 +10:00
committed by Herbert Xu
parent d00e708cef
commit e1147d8f47
6 changed files with 35 additions and 15 deletions

View File

@@ -145,6 +145,7 @@ static struct crypto_alg michael_mic_alg = {
.cra_blocksize = 8,
.cra_ctxsize = sizeof(struct michael_mic_ctx),
.cra_module = THIS_MODULE,
.cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = 8,