From 7983813be0cfc1500f2f4c83793c784a3433e173 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 15 Feb 2019 09:03:15 -0800 Subject: [PATCH] Use sha256 to hash file contents --- src/compiler/sys.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 35e9a9ec35f..33283c93803 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -632,7 +632,7 @@ namespace ts { getModifiedTime, setModifiedTime, deleteFile, - createHash: _crypto ? createMD5HashUsingNativeCrypto : generateDjb2Hash, + createHash: _crypto ? createSHA256Hash : generateDjb2Hash, createSHA256Hash: _crypto ? createSHA256Hash : undefined, getMemoryUsage() { if (global.gc) { @@ -1125,12 +1125,6 @@ namespace ts { } } - function createMD5HashUsingNativeCrypto(data: string): string { - const hash = _crypto!.createHash("md5"); - hash.update(data); - return hash.digest("hex"); - } - function createSHA256Hash(data: string): string { const hash = _crypto!.createHash("sha256"); hash.update(data);