UNPKG

1.21 kBTypeScriptView Raw
1/// <reference types="node" />
2/**
3 * @name keccakAsU8a
4 * @summary Creates a keccak Uint8Array from the input.
5 * @description
6 * From either a `string` or a `Buffer` input, create the keccak and return the result as a `Uint8Array`.
7 * @example
8 * <BR>
9 *
10 * ```javascript
11 * import { keccakAsU8a } from '@polkadot/util-crypto';
12 *
13 * keccakAsU8a('123'); // => Uint8Array
14 * ```
15 */
16export declare const keccakAsU8a: (value: string | Uint8Array | Buffer, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => Uint8Array;
17/**
18 * @name keccak256AsU8a
19 * @description Creates a keccak256 Uint8Array from the input.
20 */
21export declare const keccak256AsU8a: (data: string | Uint8Array | Buffer, onlyJs?: boolean | undefined) => Uint8Array;
22/**
23 * @name keccak512AsU8a
24 * @description Creates a keccak512 Uint8Array from the input.
25 */
26export declare const keccak512AsU8a: (data: string | Uint8Array | Buffer, onlyJs?: boolean | undefined) => Uint8Array;
27/**
28 * @name keccakAsHex
29 * @description Creates a keccak hex string from the input.
30 */
31export declare const keccakAsHex: (value: string | Uint8Array | Buffer, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => `0x${string}`;