> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# crypto/Ripemd160

> Auto-generated API documentation

[**@tevm/voltaire**](../index.mdx)

***

[@tevm/voltaire](../index.mdx) / crypto/Ripemd160

# crypto/Ripemd160

## Variables

### HEX\_SIZE

> `const` **HEX\_SIZE**: `40` = `40`

Defined in: [src/crypto/Ripemd160/constants.js:28](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/constants.js#L28)

Size of RIPEMD160 hash in hex characters (without 0x prefix)

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { HEX_SIZE } from './crypto/Ripemd160/index.js';
console.log(HEX_SIZE); // 40
```

***

### ~~Ripemd160~~

> `const` **Ripemd160**: (`input`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash) & `object` = `Ripemd160Hash`

Defined in: [src/crypto/Ripemd160/Ripemd160.js:53](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/Ripemd160.js#L53)

#### Type Declaration

##### ~~from()~~

> **from**: (`input`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Hash input with RIPEMD160 (constructor pattern)

Auto-detects input type and hashes accordingly:

* Uint8Array: hash directly
* string: UTF-8 encode then hash

###### Parameters

###### input

Data to hash

`string` | `Uint8Array`\<`ArrayBufferLike`>

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto/ripemd160](https://voltaire.tevm.sh/crypto/ripemd160) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160Hash } from './crypto/Ripemd160/index.js';

const hash1 = Ripemd160Hash.from("hello");           // String
const hash2 = Ripemd160Hash.from(uint8array);        // Bytes
```

##### ~~fromHex()~~

> **fromHex**: (`hex`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash) = `hashHex`

Compute RIPEMD160 hash of hex string (without 0x prefix)

###### Parameters

###### hex

`string`

Hex string (with or without 0x prefix)

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashHex("0xdeadbeef");
console.log(hash.length); // 20
```

##### ~~fromString()~~

> **fromString**: (`str`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash) = `hashString`

Compute RIPEMD160 hash of UTF-8 string

###### Parameters

###### str

`string`

Input string

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashString("hello");
console.log(hash.length); // 20
```

##### ~~hash()~~

> **hash**: (`data`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Compute RIPEMD160 hash (20 bytes)

###### Parameters

###### data

Input data (Uint8Array or string)

`string` | `Uint8Array`\<`ArrayBufferLike`>

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hash(new Uint8Array([1, 2, 3]));
console.log(hash.length); // 20
```

##### ~~hashHex()~~

> **hashHex**: (`hex`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Compute RIPEMD160 hash of hex string (without 0x prefix)

###### Parameters

###### hex

`string`

Hex string (with or without 0x prefix)

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashHex("0xdeadbeef");
console.log(hash.length); // 20
```

##### ~~hashString()~~

> **hashString**: (`str`) => [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Compute RIPEMD160 hash of UTF-8 string

###### Parameters

###### str

`string`

Input string

###### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashString("hello");
console.log(hash.length); // 20
```

##### ~~HEX\_SIZE~~

> **HEX\_SIZE**: `number`

Size of RIPEMD160 hash in hex characters (without 0x prefix)

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { HEX_SIZE } from './crypto/Ripemd160/index.js';
console.log(HEX_SIZE); // 40
```

##### ~~SIZE~~

> **SIZE**: `number`

Size of RIPEMD160 hash in bytes (160 bits)

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { SIZE } from './crypto/Ripemd160/index.js';
console.log(SIZE); // 20
```

#### Deprecated

Use Ripemd160Hash instead
Ripemd160 alias maintained for backward compatibility

***

### SIZE

> `const` **SIZE**: `20` = `20`

Defined in: [src/crypto/Ripemd160/constants.js:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/constants.js#L14)

Size of RIPEMD160 hash in bytes (160 bits)

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { SIZE } from './crypto/Ripemd160/index.js';
console.log(SIZE); // 20
```

## Functions

### from()

> **from**(`input`): [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Defined in: [src/crypto/Ripemd160/from.js:24](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/from.js#L24)

Hash input with RIPEMD160 (constructor pattern)

Auto-detects input type and hashes accordingly:

* Uint8Array: hash directly
* string: UTF-8 encode then hash

#### Parameters

##### input

Data to hash

`string` | `Uint8Array`\<`ArrayBufferLike`>

#### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

#### See

[https://voltaire.tevm.sh/crypto/ripemd160](https://voltaire.tevm.sh/crypto/ripemd160) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { Ripemd160Hash } from './crypto/Ripemd160/index.js';

const hash1 = Ripemd160Hash.from("hello");           // String
const hash2 = Ripemd160Hash.from(uint8array);        // Bytes
```

***

### hash()

> **hash**(`data`): [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Defined in: [src/crypto/Ripemd160/hash.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/hash.js#L19)

Compute RIPEMD160 hash (20 bytes)

#### Parameters

##### data

Input data (Uint8Array or string)

`string` | `Uint8Array`\<`ArrayBufferLike`>

#### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hash(new Uint8Array([1, 2, 3]));
console.log(hash.length); // 20
```

***

### hashHex()

> **hashHex**(`hex`): [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Defined in: [src/crypto/Ripemd160/hashHex.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/hashHex.js#L19)

Compute RIPEMD160 hash of hex string (without 0x prefix)

#### Parameters

##### hex

`string`

Hex string (with or without 0x prefix)

#### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashHex("0xdeadbeef");
console.log(hash.length); // 20
```

***

### hashString()

> **hashString**(`str`): [`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

Defined in: [src/crypto/Ripemd160/hashString.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ripemd160/hashString.js#L19)

Compute RIPEMD160 hash of UTF-8 string

#### Parameters

##### str

`string`

Input string

#### Returns

[`Ripemd160Hash`](../index/index.mdx#ripemd160hash)

20-byte hash

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import { Ripemd160 } from './crypto/Ripemd160/index.js';
const hash = Ripemd160.hashString("hello");
console.log(hash.length); // 20
```

## References

### Ripemd160Hash

Re-exports [Ripemd160Hash](../index/index.mdx#ripemd160hash)
