PHP WebShell

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

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

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.digest = digest;

var _crypto = _interopRequireDefault(require("crypto"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * @param {Uint8Array} data
 * @returns {Promise<Uint8Array>}
 */
// eslint-disable-next-line @typescript-eslint/require-await
async function digest(data) {
  // fallback to trying node-crypto which could be polyfilled by the browser environment
  return _crypto.default.createHash("sha256").update(data).digest();
}

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


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