FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/fips_test.c
/* dead simple base16 encoder, 0 on success */
dead simple base16 encoder, 0 on success
dead simple base16 encoder 0 on success
static int GenBase16_Hash(const byte* in, int length, char* out, int outSz)
{
    int i;
    int index = 0;
    if ( (length * 2 + 1) > outSz)
        return -1;
    for (i = 0; i < length; i++) {
        byte a = in[i] >> 4;
        byte b = in[i] & 0x0f;
        if (a > 9)
            a+=7;
        if (b > 9)
            b+=7;
        out[index++] = a + 0x30;
        out[index++] = b + 0x30;
    }
    out[index++] = '\0';
    return 0;
}
static int GenBase16_Hash ( const byte * in , int length , char * out , int outSz ) { int i ; int index = 0 ; if ( ( length * 2 + 1 ) > outSz ) return -1 ; for ( i = 0 ; i < length ; i ++ ) { byte a = in [ i ] >> 4 ; byte b = in [ i ] & 0x0f ; if ( a > 9 ) a += 7 ; if ( b > 9 ) b += 7 ; out [ index ++ ] = a + 0x30 ; out [ index ++ ] = b + 0x30 ; } out [ index ++ ] = ' \0 ' ; return 0 ; }
dead simple base16 encoder, 0 on success
dead simple base16 encoder 0 on success