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)
1
2
3

Parameters:

Name Type
data Buffer | Uint8Array | string
seed number

Returns: BN


Last Updated: 2/26/2019, 11:50:54 AM