2018-06-21 11:31:52 +02:00
|
|
|
// 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"/>
|
|
|
|
|
2018-06-22 12:56:09 +02:00
|
|
|
declare module 'keccak' {
|
2018-06-21 11:31:52 +02:00
|
|
|
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';
|
|
|
|
|
2018-06-22 15:43:18 +02:00
|
|
|
const keccak: (type: KeccakTypes) => KeccakHasher;
|
2018-06-21 11:31:52 +02:00
|
|
|
|
2018-06-22 15:43:18 +02:00
|
|
|
export default keccak;
|
2018-06-22 12:56:09 +02:00
|
|
|
}
|