  'use strict';
const crc32 = require('buffer-crc32'); 
let CRC = {
    crc32Buffer: function (buff) { 
        let r = crc32(buff) ;
        let result = ''; 
        let temp;
        for (let i = 0; i < r.length; i++) { 
            temp = r[i].toString(16); 
            if (temp.length < 2)
                temp = '0' + temp; 
            result += temp; 
        } 
        return result.toUpperCase(); 
    }
} 
module.exports = CRC;

