PHP CRC32 长度输出

发布于 2024-09-02 20:11:12 字数 49 浏览 3 评论 0原文

有什么可以使 PHP CRC32 函数的返回长度发生变化吗?

谢谢!

Is there anything that can make the returned length of the PHP CRC32 function to vary?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

残龙傲雪 2024-09-09 20:11:12

不,根据定义,CRC32 有 32 位。

您只能改变其表示形式。例如,虽然它可以用 4 个 8 位字节表示(因此适合 PHP int),但您可能希望在字符串中以 10 为基数表示该数字,然后它可以有 10 个字符(无符号),因为2^32-1 是 4294967295。

No, by definition a CRC32 has 32-bits.

You can only vary its representation. For instance, while it can be represented with 4 8-bit bytes (and hence fits in a PHP int), you may wish to represent that number in base 10 in a string, and then it can have 10 characters (unsigned), since 2^32-1 is 4294967295.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文