Skip to content

RIPEMD-160 adapter for WebAssembly and JS implementations

Notifications You must be signed in to change notification settings

hazae41/ripemd160

Repository files navigation

Ripemd160

RIPEMD-160 adapter for WebAssembly and JS implementations

npm i @hazae41/ripemd160

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Getting started

Morax (WebAssembly)

npm i @hazae41/morax
import { Ripemd160 } from "@hazae41/ripemd160"

Ripemd160.set(await Ripemd160.fromMorax())

Noble (JavaScript)

npm i @noble/hashes
import { Ripemd160 } from "@hazae41/ripemd160"

Ripemd160.set(Ripemd160.fromNoble())

Usage

Direct

const hashed: Uint8Array = Ripemd160.get().tryHash(new Uint8Array([1,2,3,4,5])).unwrap().copyAndDispose()

Incremental

const hasher = Ripemd160.get().Hasher.tryNew().unwrap()
hasher.tryUpdate(new Uint8Array([1,2,3,4,5])).unwrap()
const hashed: Uint8Array = hasher.tryFinalize().unwrap().copyAndDispose()

About

RIPEMD-160 adapter for WebAssembly and JS implementations

Resources

Stars

Watchers

Forks

Packages

No packages published