How to calculate 32 bit CRC in Ruby on rails?

随声附和 提交于 2019-12-04 09:07:24

问题


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')


来源:https://stackoverflow.com/questions/4273281/how-to-calculate-32-bit-crc-in-ruby-on-rails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!