Current Folder
This commit is contained in:
1 parent
8b3382289b
commit
cfcada880d
4379 files changed
No files matched your search
+15
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in new issue
Block a user