Files
common/docs/util-crypto/modules/_xxhash_ashex_.md
T
2018-11-28 15:23:14 +00:00

997 B

Functions

xxhashAsHex

▸ xxhashAsHex(data: * Buffer | Uint8Array | string*, bitLength?: number): string

Defined in xxhash/asHex.ts:24

name: xxhashAsHex

signature: xxhashAsHex (data: Buffer | Uint8Array | string, bitLength: number = 64): string

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