是否有namick/obfuscate_id rails插件的php端口? [英] Is there a php port of namick/obfuscate_id rails plugin ?

查看:41
本文介绍了是否有namick/obfuscate_id rails插件的php端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请检查此 https://github.com/namick/obfuscate_id 该插件将id 7000转换为5270192353

Please check this https://github.com/namick/obfuscate_id This plugin converts id 7000 to 5270192353

我尝试了 https://github.com/ivanakimov/hashids.php ,它类似于,但它会将ID转换为(yJJpo90)和数字之类的字母的混合.我不希望那样.我希望ID转换为正整数.是否有用于此类的php软件包?

I tried https://github.com/ivanakimov/hashids.php and it similar ones but it converts ids into a mix of alphabets like (yJJpo90) and numbers.I don't want that.I want IDs to convert into a positive integers.Are there any php packages for this sort?

推荐答案

您可以尝试 Optimus id转换:

使用此库,您可以根据Knuth的整数哈希将内部ID转换为混淆的整数.它类似于Hashids,但将生成整数而不是随机字符串.它也超级快.

https://github.com/jenssegers/optimus

这篇关于是否有namick/obfuscate_id rails插件的php端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆