Files
k8s-set-context/node_modules/jose/lib/help/uint64be.js
github-actions[bot] 52d71d28bd Add node modules and compiled JavaScript from main (#54)
Co-authored-by: Oliver King <oking3@uncc.edu>
2022-06-29 15:41:55 -04:00

11 lines
244 B
JavaScript

const MAX_INT32 = Math.pow(2, 32)
module.exports = (value, buf = Buffer.allocUnsafe(8)) => {
const high = Math.floor(value / MAX_INT32)
const low = value % MAX_INT32
buf.writeUInt32BE(high, 0)
buf.writeUInt32BE(low, 4)
return buf
}