1 | import * as Crypto from 'crypto';
|
2 | import * as Client from './client';
|
3 |
|
4 | export interface Artifacts {
|
5 | app?: string;
|
6 | dlg?: string;
|
7 | ext?: string;
|
8 | hash?: string;
|
9 | host: string;
|
10 | method: string;
|
11 | nonce: string;
|
12 | port: number;
|
13 | resource: string;
|
14 | ts: string;
|
15 | }
|
16 |
|
17 | export interface TimestampMessage {
|
18 | ts: number;
|
19 | tsm: string;
|
20 | }
|
21 |
|
22 | export const headerVersion: string;
|
23 |
|
24 | export const algorithms: string[];
|
25 |
|
26 | export function calculateMac(type: string, credentials: Client.Credentials, options: Artifacts): string;
|
27 |
|
28 | export function generateNormalizedString(type: string, options: Artifacts): string;
|
29 |
|
30 | export function calculatePayloadHash(payload: string, algorithm: string, contentType: string): string;
|
31 |
|
32 | export function initializePayloadHash(algorithm: string, contentType: string): string;
|
33 |
|
34 | export function finalizePayloadHash(hash: Crypto.Hash): string;
|
35 |
|
36 | export function calculateTsMac(ts: string, credentials: Client.Credentials): string;
|
37 |
|
38 | export function timestampMessage(credentials: Client.Credentials, localtimeOffsetMsec: number): TimestampMessage;
|