| 400 | } |
| 401 | |
| 402 | napi_value hasherDigest(napi_env env, napi_callback_info info) { |
| 403 | napi_value js_this; |
| 404 | napi_get_cb_info(env, info, NULL, NULL, &js_this, NULL); |
| 405 | |
| 406 | hasher_t *hasher; |
| 407 | napi_unwrap(env, js_this, (void **)&hasher); |
| 408 | |
| 409 | sz_u64_t hash = sz_hash_state_digest(&hasher->state); |
| 410 | napi_value js_result; |
| 411 | napi_create_bigint_uint64(env, hash, &js_result); |
| 412 | |
| 413 | return js_result; |
| 414 | } |
| 415 | |
| 416 | napi_value hasherReset(napi_env env, napi_callback_info info) { |
| 417 | napi_value js_this; |
nothing calls this directly
no test coverage detected
searching dependent graphs…