Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 303391d6 authored by Antoine Tenart's avatar Antoine Tenart Committed by Herbert Xu
Browse files

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: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 214a9bd0
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -392,12 +392,8 @@ static int sun4i_hash(struct ahash_request *areq)
	}

	/* write the remaining bytes of the nbw buffer */
	if (nbw) {
	wb |= ((1 << 7) << (nbw * 8));
	bf[j++] = wb;
	} else {
		bf[j++] = 1 << 7;
	}

	/*
	 * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)