Skip to content

Commit

Permalink
Switch to using sha256 for checksums (fixes CodeQL warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Jan 8, 2024
1 parent 2443fd1 commit 604c27c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function computeChecksum(filename) {
const contents = fs.readFileSync(filename);

const hash = crypto
.createHash('md5')
.createHash('sha256')
.update(contents)
.digest('base64')
.replace(/=+$/, '');
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/checksum/node/checksumService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ChecksumService implements IChecksumService {
async checksum(resource: URI): Promise<string> {
const stream = (await this.fileService.readFileStream(resource)).value;
return new Promise<string>((resolve, reject) => {
const hash = createHash('md5');
const hash = createHash('sha256');

listenStream(stream, {
onData: data => hash.update(data.buffer),
Expand Down

0 comments on commit 604c27c

Please sign in to comment.