mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 20:37:13 -05:00
12 lines
532 B
TypeScript
12 lines
532 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
import * as crypto from 'crypto';
|
|
|
|
export function computeSHA256(str: string): string {
|
|
const hash = crypto.createHash('sha256');
|
|
hash.update(str);
|
|
return hash.digest('hex');
|
|
}
|