mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 09:08:03 +00:00
21 lines
857 B
TypeScript
21 lines
857 B
TypeScript
/**
|
|
* @name blake2AsU8a
|
|
* @summary Creates a blake2b u8a from the input.
|
|
* @description
|
|
* From a `Uint8Array` input, create the blake2b and return the result as a u8a with the specified `bitLength`.
|
|
* @example
|
|
* <BR>
|
|
*
|
|
* ```javascript
|
|
* import { blake2AsU8a } from '@pezkuwi/util-crypto';
|
|
*
|
|
* blake2AsU8a('abc'); // => [0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d]
|
|
* ```
|
|
*/
|
|
export declare function blake2AsU8a(data: string | Uint8Array, bitLength?: 64 | 128 | 256 | 384 | 512, key?: Uint8Array | null, onlyJs?: boolean): Uint8Array;
|
|
/**
|
|
* @name blake2AsHex
|
|
* @description Creates a blake2b hex from the input.
|
|
*/
|
|
export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
|