- keccak
- keccak256
- keccakFromArray
- keccakFromHexString
- keccakFromString
- ripemd160
- ripemd160FromArray
- ripemd160FromString
- rlphash
- sha256
- sha256FromArray
- sha256FromString
▸ keccak(a: Buffer, bits: number): Buffer
Defined in hash.ts:13
Creates Keccak hash of a Buffer input
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
a |
Buffer | - | The input data (Buffer) |
bits |
number | 256 | (number = 256) The Keccak width |
Returns: Buffer
▸ keccak256(a: Buffer): Buffer
Defined in hash.ts:24
Creates Keccak-256 hash of the input, alias for keccak(a, 256).
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Buffer | The input data (Buffer) |
Returns: Buffer
▸ keccakFromArray(a: number[], bits: number): Buffer‹›
Defined in hash.ts:54
Creates Keccak hash of a number array input
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
a |
number[] | - | The input data (number[]) |
bits |
number | 256 | (number = 256) The Keccak width |
Returns: Buffer‹›
▸ keccakFromHexString(a: string, bits: number): Buffer‹›
Defined in hash.ts:44
Creates Keccak hash of an 0x-prefixed string input
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
a |
string | - | The input data (String) |
bits |
number | 256 | (number = 256) The Keccak width |
Returns: Buffer‹›
▸ keccakFromString(a: string, bits: number): Buffer‹›
Defined in hash.ts:33
Creates Keccak hash of a utf-8 string input
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
a |
string | - | The input data (String) |
bits |
number | 256 | (number = 256) The Keccak width |
Returns: Buffer‹›
▸ ripemd160(a: Buffer, padded: boolean): Buffer
Defined in hash.ts:102
Creates RIPEMD160 hash of a Buffer input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Buffer | The input data (Buffer) |
padded |
boolean | Whether it should be padded to 256 bits or not |
Returns: Buffer
▸ ripemd160FromArray(a: number[], padded: boolean): Buffer
Defined in hash.ts:122
Creates RIPEMD160 hash of a number[] input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
number[] | The input data (number[]) |
padded |
boolean | Whether it should be padded to 256 bits or not |
Returns: Buffer
▸ ripemd160FromString(a: string, padded: boolean): Buffer
Defined in hash.ts:112
Creates RIPEMD160 hash of a string input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
string | The input data (String) |
padded |
boolean | Whether it should be padded to 256 bits or not |
Returns: Buffer
▸ rlphash(a: rlp.Input): Buffer
Defined in hash.ts:148
Creates SHA-3 hash of the RLP encoded version of the input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
rlp.Input | The input data |
Returns: Buffer
▸ sha256(a: Buffer): Buffer
Defined in hash.ts:63
Creates SHA256 hash of a Buffer input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Buffer | The input data (Buffer) |
Returns: Buffer
▸ sha256FromArray(a: number[]): Buffer
Defined in hash.ts:81
Creates SHA256 hash of a number[] input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
number[] | The input data (number[]) |
Returns: Buffer
▸ sha256FromString(a: string): Buffer
Defined in hash.ts:72
Creates SHA256 hash of a string input.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
string | The input data (string) |
Returns: Buffer