mirror of
https://github.com/fluencelabs/libp2p-ts
synced 2025-03-27 15:31:04 +00:00
21 lines
623 B
TypeScript
21 lines
623 B
TypeScript
// Type definitions for keccak 1.4.0
|
|
// Project: https://github.com/cryptocoinjs/keccak
|
|
// Definitions by: Jaco Greeff <https://github.com/jacogr>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node"/>
|
|
|
|
interface KeccakHasher {
|
|
digest(): Buffer;
|
|
update(message: string | Buffer): KeccakHasher;
|
|
|
|
_resetState(): void,
|
|
_clone(): KeccakHasher
|
|
}
|
|
|
|
type KeccakTypes = 'keccak224' | 'keccak256' | 'keccak384' | 'keccak512' | 'sha3-224' | 'sha3-256' | 'sha3-384' | 'sha3-512' | 'shake128' | 'shake256';
|
|
|
|
type keccak = (type: KeccakTypes) => KeccakHasher;
|
|
|
|
export = keccak;
|