mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 03:01:08 +03:30
16 lines
260 B
JavaScript
Vendored
16 lines
260 B
JavaScript
Vendored
function incr32 (iv) {
|
|
var len = iv.length
|
|
var item
|
|
while (len--) {
|
|
item = iv.readUInt8(len)
|
|
if (item === 255) {
|
|
iv.writeUInt8(0, len)
|
|
} else {
|
|
item++
|
|
iv.writeUInt8(item, len)
|
|
break
|
|
}
|
|
}
|
|
}
|
|
module.exports = incr32
|