Skip to content

Commit d517713

Browse files
Merge pull request microsoft#29935 from RyanCavanaugh/md5_2_sha
Use sha256 to hash file contents
2 parents 691df0e + 7983813 commit d517713

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/compiler/sys.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ namespace ts {
632632
getModifiedTime,
633633
setModifiedTime,
634634
deleteFile,
635-
createHash: _crypto ? createMD5HashUsingNativeCrypto : generateDjb2Hash,
635+
createHash: _crypto ? createSHA256Hash : generateDjb2Hash,
636636
createSHA256Hash: _crypto ? createSHA256Hash : undefined,
637637
getMemoryUsage() {
638638
if (global.gc) {
@@ -1125,12 +1125,6 @@ namespace ts {
11251125
}
11261126
}
11271127

1128-
function createMD5HashUsingNativeCrypto(data: string): string {
1129-
const hash = _crypto!.createHash("md5");
1130-
hash.update(data);
1131-
return hash.digest("hex");
1132-
}
1133-
11341128
function createSHA256Hash(data: string): string {
11351129
const hash = _crypto!.createHash("sha256");
11361130
hash.update(data);

0 commit comments

Comments
 (0)