@bithomp/xrpl-api
Version:
A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger
13 lines (12 loc) • 357 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const crypto_1 = require("crypto");
const HASH_SIZE = 64;
function sha512Half(hex) {
return (0, crypto_1.createHash)('sha512')
.update(Buffer.from(hex, 'hex'))
.digest('hex')
.toUpperCase()
.slice(0, HASH_SIZE);
}
exports.default = sha512Half;
;