microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
b87e8e2ac9d3d339ad558be87ff2408325bff723

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/common/node/crypto.ts

12lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import * as crypto from "crypto";
5
6export class Crypto {
7 public hash(data: string): string {
8 const hasher = crypto.createHash("sha256");
9 hasher.update(data);
10 return hasher.digest("hex");
11 }
12}