Files
common/docs/util-crypto/modules/_xxhash_ashex_.md
T
2019-02-28 09:51:40 +00:00

881 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 | string -
Default value bitLength number 64

Returns: string