use sha256 in git (#201781)

This commit is contained in:
João Moreno 2024-01-04 12:02:02 +01:00 committed by GitHub
parent 750117cf1d
commit e2eb6c042b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ export interface IIPCHandler {
export async function createIPCServer(context?: string): Promise<IPCServer> {
const server = http.createServer();
const hash = crypto.createHash('sha1');
const hash = crypto.createHash('sha256');
if (!context) {
const buffer = await new Promise<Buffer>((c, e) => crypto.randomBytes(20, (err, buf) => err ? e(err) : c(buf)));
@ -39,7 +39,7 @@ export async function createIPCServer(context?: string): Promise<IPCServer> {
hash.update(context);
}
const ipcHandlePath = getIPCHandlePath(hash.digest('hex').substr(0, 10));
const ipcHandlePath = getIPCHandlePath(hash.digest('hex').substring(0, 10));
if (process.platform !== 'win32') {
try {