mirror of
https://github.com/Microsoft/vscode
synced 2024-07-17 02:57:19 +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> {
|
export async function createIPCServer(context?: string): Promise<IPCServer> {
|
||||||
const server = http.createServer();
|
const server = http.createServer();
|
||||||
const hash = crypto.createHash('sha1');
|
const hash = crypto.createHash('sha256');
|
||||||
|
|
||||||
if (!context) {
|
if (!context) {
|
||||||
const buffer = await new Promise<Buffer>((c, e) => crypto.randomBytes(20, (err, buf) => err ? e(err) : c(buf)));
|
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);
|
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') {
|
if (process.platform !== 'win32') {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue