mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
Add types for ripemd160
This commit is contained in:
Vendored
+16
@@ -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;
|
||||
}
|
||||
@@ -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');
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user