amirax/base62 问题修复 & 功能扩展

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

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

amirax/base62

Composer 安装命令:

composer require amirax/base62

包简介

Base62 encoder and decoder

README 文档

README

Latest Version Software License Build Status Codacy grade

Install

The preferred way to install this extension is through composer.

Either run:

composer require amirax/base62

Usage

This package use encoder based on pure PHP. Library can encode strings, integers or bytes.

use Amirax\Base62;

$base62 = new Base62();
echo $encodedData = $base62->encode('Hello World!');    // T8dgcjRGkZ3aysdN
echo $base62->decode($encodedData);                     // Hello World!

Also you can use a salt:

use Amirax\Base62;

echo (new Base62())->encode('Hello World!');                    // T8dgcjRGkZ3aysdN
echo (new Base62('my_secret_salt'))->encode('Hello World!');    // e4NKCYHiEbv8qjNx

Or you can set custom alphabet:

use Amirax\Base62;

// Custom alphabet without salt. Output: 2678lx5gvmsv1dro9b5
echo (new Base62('', '0123456789abcdefghijklmnopqrstuvwxyz'))->encode('Hello World!');

// ... and with salt. Output: v79ljqkhx3bxnafi2mk
echo (new Base62('my_secret_salt', '0123456789abcdefghijklmnopqrstuvwxyz'))->encode('Hello World!');

Testing

You can run tests either run:

composer test

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固