Add types for ripemd160

This commit is contained in:
Dimitri Benin
2018-11-26 22:03:57 +01:00
parent 3fd74d83b5
commit 9ed2a742a2
4 changed files with 47 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for ripemd160 2.0
// Project: https://github.com/crypto-browserify/ripemd160#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { Hash } from 'crypto';
export = RIPEMD160;
declare const RIPEMD160: RIPEMD160Static;
interface RIPEMD160Static {
new (): Hash;
}
+7
View File
@@ -0,0 +1,7 @@
import RIPEMD160 = require('ripemd160');
new RIPEMD160().update('42').digest('hex');
const ripemd160stream = new RIPEMD160();
ripemd160stream.end('42');
(ripemd160stream.read() as Buffer).toString('hex');
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ripemd160-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }