teguh02/rsa_php
Composer 安装命令:
composer require teguh02/rsa_php
包简介
Simple package to handle RSA encryption and decryption algorithm
README 文档
README
Simple package to handle RSA encryption and decryption algorithm
This PHP library are couples from this php library https://github.com/teguh02/rsa_js
Installation
If you want to install this library you can install with this command
composer require teguh02/rsa_php
Usage
<?php // import autoload require_once __DIR__ . '/../vendor/autoload.php'; // Import the RSA module use Teguh02\RsaPhp\RSA; // Define p and q const P = 61; const Q = 53; // Generate the RSA public and private keys $keys = RSA::generateKeys(P, Q); // Print the public and private keys echo "Public key: (" . $keys["public"][0] . ", " . $keys["public"][1] . ")\n"; echo "Private key: (" . $keys["private"][0] . ", " . $keys["private"][1] . ")\n"; // Define the message to be encrypted $message = "I LOVE YOU"; // Encrypt the message using the public key $encrypted = RSA::encrypt($message, $keys); print("Encrypted message: " . join(",", $encrypted) . "\n"); // Decrypt the message using the private key // $decrypted = RSA::decrypt($encrypted, $keys); $decrypted = RSA::decrypt('286,2774,83,913,1781,155,2774,206,913,2509', $keys); print("Decrypted message: " . $decrypted . "\n");
teguh02/rsa_php 适用场景与选型建议
teguh02/rsa_php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 07 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 teguh02/rsa_php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 teguh02/rsa_php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-04