UNPKG

@plugnet/util-crypto

Version:
16 lines (15 loc) 507 B
/** * @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 '@plugnet/util-crypto'; * * blake2AsU8a('abc'); // => [0xba, 0x80, 0xa53, 0xf98, 0x1c, 0x4d, 0x0d] * ``` */ export default function blake2AsU8a(data: Uint8Array | string, bitLength?: number, key?: Uint8Array | null): Uint8Array;