mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-17 13:50:46 +01:00
333d9a4053
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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');
|
|
}
|