- 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:38
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:68
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:58
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:47
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:116
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:136
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:126
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:162
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:77
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:95
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:86
Creates SHA256 hash of a string input.
Parameters:
Name | Type | Description |
---|---|---|
a |
string | The input data (string) |
Returns: Buffer