877 B
877 B
Functions
xxhashAsHex
▸ xxhashAsHex(data: Buffer | Uint8Array | string, bitLength?: number): string
Defined in xxhash/asHex.ts:23
name: xxhashAsHex
summary: Creates a xxhash64 hex from the input.
description: From either a string, Uint8Array or a Buffer input, create the xxhash64 and return the result as a hex string with the specified bitLength.
example:
import { xxhashAsHex } from '@polkadot/util-crypto';
xxhashAsHex('abc'); // => 0x44bc2cf5ad770999
Parameters:
| Name | Type | Default value |
|---|---|---|
| data | Buffer |
Uint8Array |
Default value bitLength |
number |
64 |
Returns: string