hash-wasm-rs 0.1.0

A WebAssembly library for computing file hashes, built with Rust.
Documentation
1
2
3
4
5
6
7
8
9
use crate::hash::{hash_result::HashResult, hash_type::HashType, hasher_wrapper::HasherWrapper};
use wasm_bindgen::prelude::*;

#[wasm_bindgen(js_name = sha3_512)]
pub async fn sha3_512_hash(data: &JsValue) -> Result<HashResult, JsValue> {
    HasherWrapper::new(HashType::SHA3_512, data)
        .hash_result()
        .await
}