rubycrccrc32

How to calculate 32 bit CRC in Ruby on rails?


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


Solution

  • You could use Ruby's Zlib module.

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