1 | /// <reference types="node" />
|
2 | import { rlp } from './externals';
|
3 | /**
|
4 | * Creates Keccak hash of a Buffer input
|
5 | * @param a The input data (Buffer)
|
6 | * @param bits (number = 256) The Keccak width
|
7 | */
|
8 | export declare const keccak: (a: Buffer, bits?: number) => Buffer;
|
9 | /**
|
10 | * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
|
11 | * @param a The input data (Buffer)
|
12 | */
|
13 | export declare const keccak256: (a: Buffer) => Buffer;
|
14 | /**
|
15 | * Creates Keccak hash of a utf-8 string input
|
16 | * @param a The input data (String)
|
17 | * @param bits (number = 256) The Keccak width
|
18 | */
|
19 | export declare const keccakFromString: (a: string, bits?: number) => Buffer;
|
20 | /**
|
21 | * Creates Keccak hash of an 0x-prefixed string input
|
22 | * @param a The input data (String)
|
23 | * @param bits (number = 256) The Keccak width
|
24 | */
|
25 | export declare const keccakFromHexString: (a: string, bits?: number) => Buffer;
|
26 | /**
|
27 | * Creates Keccak hash of a number array input
|
28 | * @param a The input data (number[])
|
29 | * @param bits (number = 256) The Keccak width
|
30 | */
|
31 | export declare const keccakFromArray: (a: number[], bits?: number) => Buffer;
|
32 | /**
|
33 | * Creates SHA256 hash of a Buffer input.
|
34 | * @param a The input data (Buffer)
|
35 | */
|
36 | export declare const sha256: (a: Buffer) => Buffer;
|
37 | /**
|
38 | * Creates SHA256 hash of a string input.
|
39 | * @param a The input data (string)
|
40 | */
|
41 | export declare const sha256FromString: (a: string) => Buffer;
|
42 | /**
|
43 | * Creates SHA256 hash of a number[] input.
|
44 | * @param a The input data (number[])
|
45 | */
|
46 | export declare const sha256FromArray: (a: number[]) => Buffer;
|
47 | /**
|
48 | * Creates RIPEMD160 hash of a Buffer input.
|
49 | * @param a The input data (Buffer)
|
50 | * @param padded Whether it should be padded to 256 bits or not
|
51 | */
|
52 | export declare const ripemd160: (a: Buffer, padded: boolean) => Buffer;
|
53 | /**
|
54 | * Creates RIPEMD160 hash of a string input.
|
55 | * @param a The input data (String)
|
56 | * @param padded Whether it should be padded to 256 bits or not
|
57 | */
|
58 | export declare const ripemd160FromString: (a: string, padded: boolean) => Buffer;
|
59 | /**
|
60 | * Creates RIPEMD160 hash of a number[] input.
|
61 | * @param a The input data (number[])
|
62 | * @param padded Whether it should be padded to 256 bits or not
|
63 | */
|
64 | export declare const ripemd160FromArray: (a: number[], padded: boolean) => Buffer;
|
65 | /**
|
66 | * Creates SHA-3 hash of the RLP encoded version of the input.
|
67 | * @param a The input data
|
68 | */
|
69 | export declare const rlphash: (a: rlp.Input) => Buffer;
|