Socket
Socket
Sign inDemoInstall

@types/create-hash

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/create-hash

TypeScript definitions for create-hash


Version published
Weekly downloads
35K
decreased by-27.5%
Maintainers
1
Install size
2.01 MB
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/create-hash

Summary

This package contains type definitions for create-hash (https://github.com/crypto-browserify/createHash).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/create-hash.

index.d.ts

/// <reference types="node" />

declare namespace createHash {
    type TypedArray =
        | Uint8Array
        | Uint8ClampedArray
        | Uint16Array
        | Uint32Array
        | Int8Array
        | Int16Array
        | Int32Array
        | Float32Array
        | Float64Array;

    interface HashAlgorithm {
        digest(target: encoding): string;
        digest(): Buffer;

        update(data: string | Buffer | TypedArray | DataView, encoding?: string): this;
        write(data: string | Buffer | TypedArray | DataView, encoding?: string): this;

        end(): void;
        read(): void;
    }

    type encoding = "utf8" | "hex" | "base64";
    type algorithm =
        | "md5"
        | "rmd160"
        | "ripemd160"
        | "sha"
        | "sha1"
        | "sha224"
        | "sha256"
        | "sha384"
        | "sha512";
}

declare function createHash(algorithm: createHash.algorithm, options?: any): createHash.HashAlgorithm;

export = createHash;

Additional Details

  • Last updated: Wed, 29 Nov 2023 18:36:16 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender, Konstantin Yuriev, and Max Boguslavskiy.

FAQs

Last updated on 29 Nov 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc