All functions are available on Ripemd160 / Ripemd160Hash and as tree-shakeable named exports from @tevm/voltaire/Ripemd160.
Method
Signature
Returns
Notes
from
(input: Uint8Array | string)
Ripemd160Hash
Auto-detects Uint8Array or UTF-8 string
hash
(data: Uint8Array)
Ripemd160Hash
Hashes raw bytes
hashString / fromString
(str: string)
Ripemd160Hash
UTF-8 encodes then hashes
hashHex / fromHex
(hex: string)
Ripemd160Hash
Decodes hex string then hashes
SIZE
20
number
Digest length in bytes
HEX_SIZE
40
number
Digest length in hex characters (without 0x)
Security Warning
RIPEMD-160 provides only 80-bit collision resistance due to its 160-bit output size. Use it only for protocol compatibility (EVM precompile 0x03, Bitcoin HASH160). Use Keccak256 or SHA256 for new protocols.