Example #1
0
    /* does init */
    int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 keySz)
    {
        if (hmac == NULL || (key == NULL && keySz != 0) ||
           !(type == MD5 || type == SHA    || type == SHA256 || type == SHA384
                         || type == SHA512 || type == BLAKE2B_ID)) {
            return BAD_FUNC_ARG;
        }

        return HmacSetKey_fips(hmac, type, key, keySz);
    }
Example #2
0
/* does init */
int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 keySz)
{
    return HmacSetKey_fips(hmac, type, key, keySz);
}