northlands/permuteseq 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

northlands/permuteseq

最新稳定版本:v0.2

Composer 安装命令:

composer require northlands/permuteseq

包简介

A small PHP library to obfuscate numbers.

README 文档

README

A small PHP library to obfuscate numbers. Use it when you don't want to expose your database numeric ids to users.

The permutations are collision-free and fully deterministic. The random-looking effect is due to encryption, not to a PRNG. The same boundary range with the same secret key will always produce the same output.

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Installation

You can install the package via composer:

composer require northlands/permuteseq

Usage

$permuteseq = new Permuteseq(123456789012345, 1000, 9999); // Range 1000-9999

$encoded = $permuteseq->encode(1000); // 1446
$decoded = $permuteseq->decode($encoded); // 1000

Testing

composer test

In order to ensure compability with the Postgres extension, an integration test is included:

vendor/bin/pest --group=integration

The integration test requires a running Postgres database with the extension installed:

docker build -t postgres tests
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=local -d postgres

psql> CREATE EXTENSION permuteseq;

Changelog

Please see CHANGELOG for more information on what has changed recently.

Disclaimer

The library should not be considered cryptographically strong or used to sensitive data.

Credits

Alternatives

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 164
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固