UNPKG

@airgap/crypto

Version:

The @airgap/crypto packages provides common crypto functionalities.

22 lines 732 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hexDecodeNode = exports.hexEncodeNode = void 0; var bytes_1 = require("./bytes"); function hexEncodeNode(node) { var bytesNode = (0, bytes_1.bytesEncodeNode)(node); return { type: 'hex', secretKey: bytesNode.secretKey.toString('hex'), publicKey: bytesNode.publicKey.toString('hex') }; } exports.hexEncodeNode = hexEncodeNode; function hexDecodeNode(node) { return (0, bytes_1.bytesDecodeNode)({ type: 'bytes', secretKey: Buffer.from(node.secretKey, 'hex'), publicKey: Buffer.from(node.publicKey, 'hex') }); } exports.hexDecodeNode = hexDecodeNode; //# sourceMappingURL=hex.js.map