microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
78c2aaee56e1edfea55cdebbdccbf5541dff7beb

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/common/node/crypto.ts

12lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

import * as crypto from "crypto";

export class Crypto {
    public hash(data: string): string {
        const hasher = crypto.createHash("sha256");
        hasher.update(data);
        return hasher.digest("hex");
    }
}