mirror of
https://github.com/Microsoft/vscode
synced 2024-07-07 19:50:26 +00:00
use sha256 in git (#201781)
This commit is contained in:
parent
750117cf1d
commit
e2eb6c042b
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user