| Crates.io | webbuf_ripemd160 |
| lib.rs | webbuf_ripemd160 |
| version | 0.15.0 |
| created_at | 2025-12-06 16:41:03.893357+00 |
| updated_at | 2025-12-13 13:44:00.455368+00 |
| description | Ripemd160 hash function for WebBuf with optional support for WASM. |
| homepage | |
| repository | https://github.com/identellica/webbuf |
| max_upload_size | |
| id | 1970408 |
| size | 37,390 |
RIPEMD-160 cryptographic hash function for Rust and WebAssembly.
[dependencies]
webbuf_ripemd160 = "0.13"
use webbuf_ripemd160::{ripemd160_hash, double_ripemd160_hash};
// RIPEMD-160 hash
let data = b"Hello, world!";
let hash = ripemd160_hash(data).unwrap();
assert_eq!(hash.len(), 20); // RIPEMD-160 produces 20-byte output
// Double hash (hash of hash)
let double_hash = double_ripemd160_hash(data).unwrap();
assert_eq!(double_hash.len(), 20);
| Function | Description |
|---|---|
ripemd160_hash(data: &[u8]) -> Result<Vec<u8>, String> |
Compute RIPEMD-160 hash (20 bytes) |
double_ripemd160_hash(data: &[u8]) -> Result<Vec<u8>, String> |
Compute hash of hash |
Build with the wasm feature for WebAssembly support:
[dependencies]
webbuf_ripemd160 = { version = "0.13", features = ["wasm"] }
The TypeScript wrapper is available as @webbuf/ripemd160 on npm.
MIT