Skip to content

Commit

Permalink
Remove dependency on crypto-js
Browse files Browse the repository at this point in the history
  • Loading branch information
John Riordan committed May 7, 2020
1 parent 48ed0c0 commit 504c1a1
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 18 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@
"typescript"
],
"dependencies": {
"crypto-js": "^3.3.0",
"events": "^3.1.0"
},
"devDependencies": {
"@microsoft/api-documenter": "7.7.20",
"@microsoft/api-extractor": "7.7.11",
"@types/crypto-js": "^3.1.45",
"@types/events": "^3.0.0",
"@types/jasmine": "^3.5.10",
"@typescript-eslint/eslint-plugin": "^2.30.0",
Expand Down
8 changes: 6 additions & 2 deletions src/core/messages/digest-authentication.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import MD5 from "crypto-js/md5";
import { Md5 } from "./md5";

import { URI } from "../../grammar";
import { Logger, LoggerFactory } from "../log";
import { OutgoingRequestMessage } from "./outgoing-request-message";
import { createRandomToken } from "./utils";

function MD5(s: string): string {
return Md5.hashStr(s);
}

/**
* Digest Authentication.
* @internal
Expand All @@ -18,7 +22,7 @@ export class DigestAuthentication {
private cnonce: string | undefined;
private nc: number;
private ncHex: string;
private response: CryptoJS.WordArray | undefined;
private response: string | undefined;
private algorithm: string | undefined;
private realm: string | undefined;
private nonce: string | undefined;
Expand Down
Loading

0 comments on commit 504c1a1

Please sign in to comment.