@hazae41/ripemd160
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

WebAssembly

npm i @hazae41/ripemd.wasm
import { Ripemd160 } from "@hazae41/ripemd160"
import { RipemdWasm } from "@hazae41/ripemd.wasm"

await RipemdWasm.initBundled()

Ripemd160.set(Ripemd160.fromWasm(RipemdWasm))

Noble (JavaScript)

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

Ripemd160.set(Ripemd160.fromNoble(Ripemd160Noble))

Usage

Direct

using hashed: Copiable = Ripemd160.get().getOrThrow().hashOrThrow(new Uint8Array([1,2,3,4,5]))
const hashed2: Uint8Array = hashed.bytes.slice()

Incremental

using hasher: Ripemd160.Hasher = Ripemd160.get().getOrThrow().Hasher.createOrThrow()
hasher.updateOrThrow(new Uint8Array([1,2,3,4,5]))
hasher.updateOrThrow(new Uint8Array([6,7,8,9,10]))

using hashed: Copiable = hasher.finalizeOrThrow()
const hashed2: Uint8Array = hashed.bytes.slice()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    9
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    9
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i @hazae41/ripemd160

Weekly Downloads

12

Version

1.0.3

License

MIT

Unpacked Size

80.8 kB

Total Files

36

Last publish

Collaborators

  • hazae41