a zip code crypto-currency system good for red ONLY

incr32.js 260B

12345678910111213141516
  1. function incr32 (iv) {
  2. var len = iv.length
  3. var item
  4. while (len--) {
  5. item = iv.readUInt8(len)
  6. if (item === 255) {
  7. iv.writeUInt8(0, len)
  8. } else {
  9. item++
  10. iv.writeUInt8(item, len)
  11. break
  12. }
  13. }
  14. }
  15. module.exports = incr32