PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@hashgraph/cryptography/src/primitive

Просмотр файла: sha256.native.js

import CryptoJS from "crypto-js";
import * as hex from "../encoding/hex.js";

/**
 * @param {Uint8Array} data
 * @returns {Promise<Uint8Array>}
 */
// eslint-disable-next-line @typescript-eslint/require-await
export async function digest(data) {
    return Promise.resolve(
        hex.decode(
            CryptoJS.SHA256(CryptoJS.enc.Hex.parse(hex.encode(data))).toString(
                CryptoJS.enc.Hex
            )
        )
    );
}

Выполнить команду


Для локальной разработки. Не используйте в интернете!