UNPKG

656 BTypeScriptView Raw
1// Type definitions for create-hmac 1.1
2// Project: https://github.com/crypto-browserify/createHmac
3// Definitions by: BendingBender <https://github.com/BendingBender>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5// TypeScript Version: 2.1
6
7/// <reference types="node" />
8
9import { Hmac } from 'crypto';
10
11export = createHmac;
12
13declare function createHmac(algo: createHmac.Algorithm, key: string | Buffer): Hmac;
14
15declare namespace createHmac {
16 type Algorithm =
17 | 'rmd160'
18 | 'ripemd160'
19 | 'md5'
20 | 'sha'
21 | 'sha1'
22 | 'sha224'
23 | 'sha256'
24 | 'sha384'
25 | 'sha512';
26}