Files
common/docs/util-crypto/modules/_xxhash_xxhash64_asbn_.md
T
2019-02-27 14:33:22 +00:00

812 B

Functions

xxhash64AsBn

▸ xxhash64AsBn(data: Buffer | Uint8Array | string, seed: number): BN

Defined in xxhash/xxhash64/asBn.ts:23

name: xxhash64AsBn

summary: Creates a xxhash BN from the input.

description: From either a string, Uint8Array or a Buffer input, create the xxhash and return the result as a BN.

example:

import { xxhash64AsNumber } from '@polkadot/util-crypto';

xxhash64AsBn('abcd', 0xabcd)); // => new BN(0xe29f70f8b8c96df7)

Parameters:

Name Type
data Buffer | Uint8Array | string
seed number

Returns: BN