FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/wc_dsp.c
/* Read big endian unsigned byte array into r.
 *
 * r  A single precision integer.
 * size  Maximum number of bytes to convert
 * a  Byte array.
 * n  Number of bytes in array to read.
 */
Read big endian unsigned byte array into r.
r  A single precision integer.
size  Maximum number of bytes to convert
a  Byte array.
n  Number of bytes in array to read.
Read big endian unsigned byte array into r . r A single precision integer . size Maximum number of bytes to convert a Byte array . n Number of bytes in array to read .
static void int_256_from_bin(int32* r, int size, const byte* a, int n)
{
    int i, j = 0;
    word32 s = 0;
    r[0] = 0;
    for (i = n-1; i >= 0; i--) {
        r[j] |= (((int32)a[i]) << s);
        if (s >= 18U) {
            r[j] &= 0x3ffffff;
            s = 26U - s;
            if (j + 1 >= size) {
                break;
            }
            r[++j] = (int32)a[i] >> s;
            s = 8U - s;
        }
        else {
            s += 8U;
        }
    }
    for (j++; j < size; j++) {
        r[j] = 0;
    }
}
static void int_256_from_bin ( int32 * r , int size , const byte * a , int n ) { int i , j = 0 ; word32 s = 0 ; r [ 0 ] = 0 ; for ( i = n - 1 ; i >= 0 ; i -- ) { r [ j ] |= ( ( ( int32 ) a [ i ] ) << s ) ; if ( s >= 18U ) { r [ j ] &= 0x3ffffff ; s = 26U - s ; if ( j + 1 >= size ) { break ; } r [ ++ j ] = ( int32 ) a [ i ] >> s ; s = 8U - s ; } else { s += 8U ; } } for ( j ++ ; j < size ; j ++ ) { r [ j ] = 0 ; } }
Read big endian unsigned byte array into r.
 r  A single precision integer.
Read big endian unsigned byte array into r . r A single precision integer .