1 | import type { HexString } from '@polkadot/util/types';
|
2 | /**
|
3 | * @name blake2AsU8a
|
4 | * @summary Creates a blake2b u8a from the input.
|
5 | * @description
|
6 | * From a `Uint8Array` input, create the blake2b and return the result as a u8a with the specified `bitLength`.
|
7 | * @example
|
8 | * <BR>
|
9 | *
|
10 | * ```javascript
|
11 | * import { blake2AsU8a } from '@polkadot/util-crypto';
|
12 | *
|
13 | * blake2AsU8a('abc'); // => [0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d]
|
14 | * ```
|
15 | */
|
16 | export declare function blake2AsU8a(data: HexString | Uint8Array | string, bitLength?: 64 | 128 | 256 | 384 | 512, key?: Uint8Array | null, onlyJs?: boolean): Uint8Array;
|
17 | /**
|
18 | * @name blake2AsHex
|
19 | * @description Creates a blake2b hex from the input.
|
20 | */
|
21 | export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => `0x${string}`;
|