encrypt: function (data, algorithm) { if (data instanceof Buffer && crc.buffer[algorithm]) return crc.buffer[algorithm](data); else if (crc[algorithm]) return crc[algorithm](data); else return crypto.createHash(algorithm).update(data).digest('hex'); },