Artifact Content
Not logged in

Artifact 4c4a3bb2db29265b5243f7d2d66a4eddc547b0e5:


const int64 = require('int64')

function toBuffer (str) {
  return Buffer.from(int64.dec2hex(str), 'hex')
}

function toString (buf) {
  return int64.hex2dec(buf.toString('hex'))
}

module.exports = {
  toBuffer,
  toString
}