@posthog/siphash
Version:
SipHash-2-4 fast short-input pseudo-random function
6 lines (5 loc) • 384 B
TypeScript
export declare function hash(key: Uint32Array, m: Uint8Array | string): Uint32Array;
export declare function hash_hex(key: Uint32Array, m: Uint8Array | string): string;
export declare function hash_uint(key: Uint32Array, m: Uint8Array | string): number;
export declare function string_to_u8(str: string): Uint8Array;
export declare function string16_to_key(str: string): Uint32Array;