šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

@types/fnv-plus

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/fnv-plus

TypeScript definitions for fnv-plus

1.3.2
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/fnv-plus

Summary

This package contains type definitions for fnv-plus (https://github.com/tjwebb/fnv-plus).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fnv-plus.

index.d.ts

export as namespace fnv;

export interface FnvHash {
    /** Returns the hashed value as an ascii string */
    str: () => string;

    /** Returns the hashed value as an hexadecimal string */
    hex: () => string;

    /** Returns the hashed value as an decimal string */
    dec: () => string;
}

/**
 * Hash a string using the given bit length.
 *
 * @default bitlength 52
 */
export function hash(value: string, bitlength?: number): FnvHash;

/**
 * Seed the algorithm to produce different values. Hashing the same value
 * with different seeds will very likely result in different results. To the
 * extent your seed can be random, it can serve as a source of randomness,
 * but nonetheless is not a replacement for a crypgographic PRG (pseudo-random
 * generator). By default the seed is `chongo <Landon Curt Noll> /\>./\\`.
 */
export function seed(seed: string): void;

/**
 * Controls UTF-8 awareness of hash functions. By default this is `false`.
 */
export function useUTF8(enable: boolean): void;

/** Calculate FNV-1a 32bit hash. */
export function fast1a32(value: string): number;

/** Calculate FNV-1a 32bit hash. */
export function fast1a32hex(value: string): string;

/** Calculate FNV-1a 32bit hash, handles UTF-8 strings. */
export function fast1a32utf(value: string): number;

/** Calculate FNV-1a 32bit hash, handles UTF-8 strings. */
export function fast1a32hexutf(value: string): string;

/** Calculate FNV-1a 52bit hash. */
export function fast1a52(value: string): number;

/** Calculate FNV-1a 52bit hash. */
export function fast1a52hex(value: string): string;

/** Calculate FNV-1a 52bit hash, handles UTF-8 strings. */
export function fast1a52utf(value: string): number;

/** Calculate FNV-1a 52bit hash, handles UTF-8 strings. */
export function fast1a52hexutf(value: string): string;

/** Calculate FNV-1a 64bit hash. */
export function fast1a64(value: string): number;

/** Calculate FNV-1a 64bit hash. */
export function fast1a64hex(value: string): string;

/** Calculate FNV-1a 64bit hash, handles UTF-8 strings. */
export function fast1a64utf(value: string): number;

/** Calculate FNV-1a 64bit hash, handles UTF-8 strings. */
export function fast1a64hexutf(value: string): string;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Mihnea Stoian.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts