mirror of
https://github.com/coder/code-server.git
synced 2026-05-13 15:57:27 +02:00
11 lines
519 B
TypeScript
11 lines
519 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
export async function sha256(s: string | Uint8Array): Promise<string> {
|
|
return (require('crypto')).createHash('sha256').update(s).digest('base64');
|
|
}
|