Merge pull request #21908 from szubster/fips-md5-sha256

Switch md5 to sha256
This commit is contained in:
Fredrik Adelöw
2023-12-21 10:56:22 +01:00
committed by GitHub
6 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ async function getProjectConfig(targetPath, extraConfig) {
// If no explicit id was configured, generated one based on the configuration.
if (!config.id) {
const configHash = crypto
.createHash('md5')
.createHash('sha256')
.update(version)
.update(Buffer.alloc(1))
.update(JSON.stringify(config.transform))
+1 -1
View File
@@ -70,7 +70,7 @@ function createTransformer(config) {
};
const getCacheKey = sourceText => {
return createHash('md5')
return createHash('sha256')
.update(sourceText)
.update(Buffer.alloc(1))
.update(sucrasePkg.version)
+1 -1
View File
@@ -25,7 +25,7 @@ function createTransformer(config) {
const getCacheKey = sourceText => {
return crypto
.createHash('md5')
.createHash('sha256')
.update(sourceText)
.update(Buffer.alloc(1))
.update(JSON.stringify(config))