@types/keccak
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

Installation

npm install --save @types/keccak

Summary

This package contains type definitions for keccak (https://github.com/cryptocoinjs/keccak#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keccak.

index.d.ts

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

import { Transform, TransformOptions } from "stream";
export class Keccak extends Transform {
    constructor(
        rate: number,
        capacity: number,
        delimitedSuffix: number | null,
        hashBitLength: number,
        options: TransformOptions,
    );
    update(data: string | Buffer, encoding?: BufferEncoding): Keccak;
    digest(): Buffer;
    digest(encoding: BufferEncoding): string;
}

export class Shake extends Transform {
    constructor(rate: number, capacity: number, delimitedSuffix: number | null, options: TransformOptions);
    update(data: string | Buffer, encoding?: BufferEncoding): Shake;
    squeeze(dataByteLength: number): Buffer;
    squeeze(dataByteLength: number, encoding: BufferEncoding): string;
}

export type KeccakAlgorithm = "keccak224" | "keccak256" | "keccak384" | "keccak512";
export type Sha3Algorithm = "sha3-224" | "sha3-256" | "sha3-384" | "sha3-512";
export type ShakeAlgorithm = "shake128" | "shake256";

declare function create(algorithm: KeccakAlgorithm | Sha3Algorithm, options?: TransformOptions): Keccak;

declare function create(algorithm: ShakeAlgorithm, options?: TransformOptions): Shake;

export default create;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/node

Credits

These definitions were written by odan.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/keccak

Weekly Downloads

8,325

Version

3.0.4

License

MIT

Unpacked Size

5.01 kB

Total Files

5

Last publish

Collaborators

  • types