aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/sha256.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-04-09 18:42:35 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-06-26 03:34:38 -0400
commite1147d8f47eb8fef93f98a30858192145137d2b2 (patch)
tree7e1bc0ab3d263e5bd801900195ab310625d9ab59 /crypto/sha256.c
parentd00e708cef16442cabaf23f653baf924f5d66e83 (diff)
[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>
Diffstat (limited to 'crypto/sha256.c')
-rw-r--r--crypto/sha256.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/sha256.c b/crypto/sha256.c
index 9d5ef674d6a9..d62264a8a33e 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -313,6 +313,7 @@ static struct crypto_alg alg = {
313 .cra_blocksize = SHA256_HMAC_BLOCK_SIZE, 313 .cra_blocksize = SHA256_HMAC_BLOCK_SIZE,
314 .cra_ctxsize = sizeof(struct sha256_ctx), 314 .cra_ctxsize = sizeof(struct sha256_ctx),
315 .cra_module = THIS_MODULE, 315 .cra_module = THIS_MODULE,
316 .cra_alignmask = 3,
316 .cra_list = LIST_HEAD_INIT(alg.cra_list), 317 .cra_list = LIST_HEAD_INIT(alg.cra_list),
317 .cra_u = { .digest = { 318 .cra_u = { .digest = {
318 .dia_digestsize = SHA256_DIGEST_SIZE, 319 .dia_digestsize = SHA256_DIGEST_SIZE,