pike.git / src / post_modules / Nettle / hash.H

version» Context lines:

pike.git/src/post_modules/Nettle/hash.H:95:    NO_WIDE_STRING(passwd);    HMAC_SET_KEY(&THIS->ctx, meta, passwd->len, (const uint8_t *)passwd->str);    if (cmod_CONCAT_EVAL(f_Hash__HMAC_, NETTLE_NAME, _create_fun_num) != -1) {    /* Pass along the password to the inherited pike-level code. */    apply_current(cmod_CONCAT_EVAL(f_Hash__HMAC_, NETTLE_NAME,    _create_fun_num), args);    }    }       PIKEFUN string(8bit) `()(string(8bit) text) +  flags ID_PROTECTED;    {    struct cmod_CONCAT_EVAL(NETTLE_NAME, _ctx) state;    int bytes = THIS->meta->digest_size;    struct pike_string *dst = begin_shared_string(bytes);    NO_WIDE_STRING(text);       memcpy(&state, &THIS->ctx.inner, THIS->meta->context_size);    THIS->meta->update(&state, text->len, (const uint8_t *)text->str);    hmac_digest(&THIS->ctx.outer, &THIS->ctx.inner, &state,    THIS->meta, THIS->meta->digest_size, (uint8_t *)dst->str);