Changeset a67b9443 in rtems


Ignore:
Timestamp:
02/06/23 16:57:28 (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
63b21ad5
Parents:
1d07dfa
git-author:
Sebastian Huber <sebastian.huber@…> (02/06/23 16:57:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/06/23 18:37:24)
Message:

sha512_224: Fix SHA512_224_Final() on little-endian machines.

PR: 266863
MFC after: 1 week
Reviewed by: allanjude, cperciva, des
Differential Revision: https://reviews.freebsd.org/D38372

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmd/sha512c.c

    r1d07dfa ra67b9443  
    5151
    5252/*
    53  * Encode a length len/4 vector of (uint64_t) into a length len vector of
    54  * (unsigned char) in big-endian form.  Assumes len is a multiple of 8.
    55  */
    56 static void
     53 * Encode a length (len + 7) / 8 vector of (uint64_t) into a length len
     54 * vector of (unsigned char) in big-endian form.  Assumes len is a
     55 * multiple of 4.
     56 */
     57static inline void
    5758be64enc_vect(unsigned char *dst, const uint64_t *src, size_t len)
    5859{
     
    6162        for (i = 0; i < len / 8; i++)
    6263                be64enc(dst + i * 8, src[i]);
     64        if (len % 8 == 4)
     65                be32enc(dst + i * 8, src[i] >> 32);
    6366}
    6467
    6568/*
    6669 * Decode a big-endian length len vector of (unsigned char) into a length
    67  * len/4 vector of (uint64_t).  Assumes len is a multiple of 8.
    68  */
    69 static void
     70 * len/8 vector of (uint64_t).  Assumes len is a multiple of 8.
     71 */
     72static inline void
    7073be64dec_vect(uint64_t *dst, const unsigned char *src, size_t len)
    7174{
Note: See TracChangeset for help on using the changeset viewer.