@plugnet/util-crypto
Version:
A collection of useful crypto utilities for @plugnet
17 lines (16 loc) • 514 B
TypeScript
/// <reference types="node" />
/**
* @name xxhash64AsValue
* @summary Creates a hex number from the input.
* @description
* From either a `string`, `Uint8Array` or a `Buffer` input, create the xxhash and return the result as a hex number
* @example
* <BR>
*
* ```javascript
* import { xxhash64AsValue } from '@plugnet/util-crypto';
*
* xxhash64AsValue('abcd', 0xabcd)); // => e29f70f8b8c96df7
* ```
*/
export default function xxhash64AsValue(data: Buffer | Uint8Array | string, seed: number): number;