diff options
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/crc/lib/crc16_xmodem.js')
-rw-r--r-- | vnfmarket/src/main/webapp/vnfmarket/node_modules/crc/lib/crc16_xmodem.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/crc/lib/crc16_xmodem.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/crc/lib/crc16_xmodem.js deleted file mode 100644 index 98ca38ec..00000000 --- a/vnfmarket/src/main/webapp/vnfmarket/node_modules/crc/lib/crc16_xmodem.js +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by CoffeeScript 1.9.2 -var Buffer, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -module.exports = create('xmodem', function(buf, previous) { - var code, count, crc, i; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = previous != null ? ~~previous : 0x0; - count = buf.length; - i = 0; - while (count > 0) { - code = crc >>> 8 & 0xFF; - code ^= buf[i++] & 0xFF; - code ^= code >>> 4; - crc = crc << 8 & 0xFFFF; - crc ^= code; - code = code << 5 & 0xFFFF; - crc ^= code; - code = code << 7 & 0xFFFF; - crc ^= code; - count--; - } - return crc; -}); |