neo-convertor
Version:
A tool to convert neo smart contract data to human-readable one
21 lines (20 loc) • 518 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Sha256_1 = require("./Sha256");
class Subtle {
}
Subtle.digest = (algorithm, data) => {
return new Promise(function (resolve, reject) {
if (algorithm != "SHA-256") {
reject(new RangeError());
return;
}
try {
resolve(Sha256_1.Sha256.computeHash(data));
}
catch (e) {
reject(e);
}
});
};
exports.Subtle = Subtle;