MCPcopy Create free account
hub / github.com/bitpay/bitcore-message / objectWriteUInt32

Function objectWriteUInt32

bitcore-message.js:1634–1639  ·  view source on GitHub ↗
(buf, value, offset, littleEndian)

Source from the content-addressed store, hash-verified

1632}
1633
1634function objectWriteUInt32 (buf, value, offset, littleEndian) {
1635 if (value < 0) value = 0xffffffff + value + 1
1636 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
1637 buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
1638 }
1639}
1640
1641Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
1642 value = +value

Callers 1

bitcore-message.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected