更多>
最新下载
24小时阅读排行榜
- 1 css 内边距导致文字换行问题怎么办_padding 与 width 配合
- 2 css动画可以控制方向吗_通过animation direction设置
- 3 Golang健康检查接口如何设计_探针接口实现说明
- 4 css 过渡与 zoom 效果_通过过渡实现元素的放大与缩小
- 5 Golang如何只执行某一个测试用例
- 6 css 过渡的持续时间与延迟_如何使用时间控制动画的启动与停止
- 7 css 框架与移动优先设计_如何在框架中实现移动优先策略
- 8 HTML5如何检测支持特性_HTML5检测支持特性代码【步骤】
- 9 如何用Golang写一个简单Web服务_Go语言HTTP项目实战
- 10 Golang状态模式如何替代大量if else_状态管理思路解析
- 11 css组件库样式太大影响性能怎么办_拆分css文件并按需link加载
- 12 三星电脑怎么设html5默认播放器_三星定html5默放器【指定】
- 13 ps怎么利用蒙版做人物抠图 ps蒙版扣人的详细步骤
- 14 如何找出数组中不在对象列表 ID 集合中的数值
- 15 Go 中跨包传递 map 时的类型不兼容问题详解
更多>
最新教程
-
- Node.js 教程
- 15501 2025-08-28
-
- CSS3 教程
- 1544643 2025-08-27
-
- Rust 教程
- 22790 2025-08-27
-
- Vue 教程
- 25265 2025-08-22
-
- PostgreSQL 教程
- 21848 2025-08-21
-
- Git 教程
- 8861 2025-08-21
下载首页 / 类库下载 / 其它类库
<?php
namespace Hashids;
class Hashids implements HashidsInterface
{
const SEP_DIV = 3.5;
const GUARD_DIV = 12;
protected $alphabet;
protected $seps = 'cfhistuCFHISTU';
protected $guards;
protected $minHashLength;
protected $salt;
public function __construct($salt = '', $minHashLength = 0, $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
{
$this->salt = $salt;
$this->minHashLength = $minHashLength;
$this->alphabet = implode('', array_unique(str_split($alphabet)));
if (strlen($this->alphabet) < 16) {
throw new HashidsException('Alphabet must contain at least 16 unique characters.');
}
if (strpos($this->alphabet, ' ') !== false) {
throw new HashidsException('Alphabet can\'t contain spaces.');
}这是一个功能强大的php加密类,构造参数是密匙,对数字进行一些加密和解密的操作。
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn
