如何在 Ruby on rails 中计算 32 位 CRC? | 珊瑚贝

How to calculate 32 bit CRC in Ruby on rails?


我想在 Ruby on rails 中计算”输入字段值”的 32 位 CRC 值。
需要示例代码,请任何人帮助我。


你可以使用 Ruby 的 Zlib 模块。

1
2
require ‘zlib’
crc32 = Zlib::crc32(‘input field value’)

来源:https://www.codenong.com/4273281/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9185.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?