Skip to main content
@tevm/voltaire
@tevm/voltaire / index / wasm / Ripemd160Wasm

Ripemd160Wasm

Reset memory allocator (currently unused)

Functions

hash()

hash(data): Uint8Array
Defined in: src/crypto/ripemd160.wasm.ts:219 Compute RIPEMD160 hash (20 bytes)

Parameters

data
Input data (Uint8Array or string) string | Uint8Array<ArrayBufferLike>

Returns

Uint8Array 20-byte hash

Example

const hash = Ripemd160Wasm.hash(data);
// Uint8Array(20)

hashString()

hashString(str): Uint8Array
Defined in: src/crypto/ripemd160.wasm.ts:259 Compute RIPEMD160 hash of UTF-8 string

Parameters

str
string Input string

Returns

Uint8Array 20-byte hash

Example

const hash = Ripemd160Wasm.hashString("hello");
// Uint8Array(20)

load()

load(): Promise<void>
Defined in: src/crypto/ripemd160.wasm.ts:203 Load WASM module (must be called before using other functions)

Returns

Promise<void>