From 8e293d22ff9500050972713bc84a0ef3071c338a Mon Sep 17 00:00:00 2001 From: navya9singh Date: Wed, 29 Jan 2025 16:09:23 -0800 Subject: [PATCH 1/2] updating hash algorithm --- packages/documentation/scripts/generateAttribution.js | 2 +- packages/playground-examples/scripts/generateTOC.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/documentation/scripts/generateAttribution.js b/packages/documentation/scripts/generateAttribution.js index 8ba8821a2ba0..040d553438fd 100644 --- a/packages/documentation/scripts/generateAttribution.js +++ b/packages/documentation/scripts/generateAttribution.js @@ -39,7 +39,7 @@ const gravatarURLForAuthor = (email) => { return "https://avatars.githubusercontent.com/u/49038?s=100&u=0b9ac5bf42a8ea2543a05191e150e0213456744e&v=4"; default: - return crypto.createHash("md5").update(email).digest("hex"); + return crypto.createHash("sha512").update(email).digest("hex"); } }; diff --git a/packages/playground-examples/scripts/generateTOC.js b/packages/playground-examples/scripts/generateTOC.js index 7deb1cbedb9a..378a75a432b0 100644 --- a/packages/playground-examples/scripts/generateTOC.js +++ b/packages/playground-examples/scripts/generateTOC.js @@ -26,7 +26,7 @@ const getFilePaths = folderPath => { * @property {string} title - name * @property {string} lang - the language for the example * @property {number} sortIndex - when listing the objects - * @property {string} hash - the md5 of the content + * @property {string} hash - the sha512 of the content * @property {any} compilerSettings - name */ @@ -96,7 +96,7 @@ langs.forEach(lang => { .replace(/\+/g, "-"), sortIndex: index, - hash: crypto.createHash("md5").update(contents).digest("hex"), + hash: crypto.createHash("sha512").update(contents).digest("hex"), compilerSettings: compiler, }; From 2f9c2fda6ef0aca1785ac7c4b915ab742b5c47b8 Mon Sep 17 00:00:00 2001 From: navya9singh <108360753+navya9singh@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:29:14 -0800 Subject: [PATCH 2/2] Update packages/documentation/scripts/generateAttribution.js Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> --- packages/documentation/scripts/generateAttribution.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/scripts/generateAttribution.js b/packages/documentation/scripts/generateAttribution.js index 040d553438fd..b760b34f6fa9 100644 --- a/packages/documentation/scripts/generateAttribution.js +++ b/packages/documentation/scripts/generateAttribution.js @@ -39,7 +39,7 @@ const gravatarURLForAuthor = (email) => { return "https://avatars.githubusercontent.com/u/49038?s=100&u=0b9ac5bf42a8ea2543a05191e150e0213456744e&v=4"; default: - return crypto.createHash("sha512").update(email).digest("hex"); + return crypto.createHash("sha256").update(email).digest("hex"); } };