Skip to content

Commit 80c6838

Browse files
Switch to SHA256 (#1439)
1 parent 99645e1 commit 80c6838

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/daemon/serverLog/whitelist.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function redact(rawMessage: string, consentToCollectLogs: boolean): {
5757
} {
5858
const matchedMessage = MESSAGE_WHITELIST.find(msg => rawMessage.includes(msg));
5959
const message = matchedMessage ?? (consentToCollectLogs ? rawMessage : "");
60-
const hash = sha1(matchedMessage ?? rawMessage);
60+
const hash = sha256(matchedMessage ?? rawMessage);
6161
const tags = TAGS.filter(tag => rawMessage.toLocaleLowerCase().includes(tag));
6262

6363
return {
@@ -67,8 +67,8 @@ export function redact(rawMessage: string, consentToCollectLogs: boolean): {
6767
}
6868
}
6969

70-
function sha1(content: string): string {
71-
const hash = createHash("sha1");
70+
function sha256(content: string): string {
71+
const hash = createHash("sha256");
7272
hash.update(content);
7373
return hash.digest('hex');
7474
}

0 commit comments

Comments
 (0)