提交 303391d6 编写于 作者: A Antoine Ténart 提交者: Herbert Xu

crypto: sun4i-ss - simplify the appended bit assignment

A bit is appended at the end of the input buffer for sha1. Simplify the
code assigning it.
Signed-off-by: NAntoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 214a9bd0
...@@ -392,12 +392,8 @@ static int sun4i_hash(struct ahash_request *areq) ...@@ -392,12 +392,8 @@ static int sun4i_hash(struct ahash_request *areq)
} }
/* write the remaining bytes of the nbw buffer */ /* write the remaining bytes of the nbw buffer */
if (nbw) { wb |= ((1 << 7) << (nbw * 8));
wb |= ((1 << 7) << (nbw * 8)); bf[j++] = wb;
bf[j++] = wb;
} else {
bf[j++] = 1 << 7;
}
/* /*
* number of space to pad to obtain 64o minus 8(size) minus 4 (final 1) * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册