mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 09:35:39 -05:00
12 lines
538 B
TypeScript
12 lines
538 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
export async function sha256(s: string | Uint8Array): Promise<string> {
|
|
const createHash = require('sha.js');
|
|
return createHash('sha256').update(s).digest('base64');
|
|
}
|