PHPackages                             petalbranch/petal-cipher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. petalbranch/petal-cipher

ActiveLibrary[Security](/categories/security)

petalbranch/petal-cipher
========================

Petal Cipher is a lightweight reversible encryption library based on custom transformation rules.

v1.3.0(7mo ago)0181Apache-2.0PHPPHP &gt;=7.1

Since Nov 2Pushed 7mo agoCompare

[ Source](https://github.com/PetalBranch/petal-cipher)[ Packagist](https://packagist.org/packages/petalbranch/petal-cipher)[ RSS](/packages/petalbranch-petal-cipher/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (7)Used By (1)

Petal Cipher
============

[](#petal-cipher)

**语言：** 👉 简体中文 | [English](README_EN.md)

简介
--

[](#简介)

**PetalBranch/petal-cipher** 是一个基于转换规则的轻量级可逆的加密库。

安装
--

[](#安装)

> PHP 版本要求：&gt;= 7.1
> ⚠ 开发环境：PHP 8.3 , 低于此版本请先自行测试。

- **使用 Composer 安装**（推荐）

    ```
    composer require petalbranch/petal-cipher
    ```
- **手动下载**

    从 GitHub 仓库下载最新版本 ZIP 文件：

    将所有内容解压到项目目录，例如 `vendor/PetalBranch/petal-cipher`
    在 PHP 文件中引入自动加载文件或手动 require：

    ```
    use Petalbranch\PetalCipher\Utils;

    // 引入文件
    require_once './vendor/petalbranch/petal-cipher/src/Utils.php';

    // 手动引入
    Utils::requireOnceFiles();
    ```

如何使用
----

[](#如何使用)

- 使用类文件

    ```
