How to calculate 32 bit CRC in Ruby on rails?

2019-03-17 07:20发布

问题:

i want to calculate 32 bit CRC value for 'input field value" in Ruby on rails. need the sample code , please help me anyone.

回答1:

You could use Ruby's Zlib module.

require 'zlib'
crc32 = Zlib::crc32('input field value')


标签: ruby crc crc32