[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 09/22] xen/lib: add implementation of SHA-1
On Wed, Jul 02, 2025 at 04:45:44PM +0200, Jan Beulich wrote: > On 30.05.2025 15:17, Sergii Dmytruk wrote: > > +static void sha1_init(struct sha1_state *sctx) > > +{ > > + sctx->state[0] = 0x67452301UL; > > + sctx->state[1] = 0xefcdab89UL; > > + sctx->state[2] = 0x98badcfeUL; > > + sctx->state[3] = 0x10325476UL; > > + sctx->state[4] = 0xc3d2e1f0UL; > > ->state[] is an array of uint32_t, to the L-s here look inapplicable. I did that trying to stay close to sha2-256.c, but will remove Ls. > > +static void sha1_final(struct sha1_state *sctx, uint8_t > > out[SHA1_DIGEST_SIZE]) > > +{ > > + const int bit_offset = SHA1_BLOCK_SIZE - sizeof(__be64); > > + unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; > > + > > + __be32 *digest = (__be32 *)out; > > + unsigned int i; > > Please can you omit the blank line in the middle of this (not overly large) > block of declarations? > > With the two adjustments: > Acked-by: Jan Beulich <jbeulich@xxxxxxxx> > > Jan Sure, will be gone in v4. Thanks
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |