icyapril/cryptolib 问题修复 & 功能扩展

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

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

icyapril/cryptolib

Composer 安装命令:

composer require icyapril/cryptolib

包简介

CryptoLib: secure, free & open-source PHP cryptography library for everyone.

README 文档

README

Build Status Code Climate Issue Count

#CryptoLib v2

CryptoLib: secure, free & open-source PHP cryptography library for everyone. It makes it easy for those who would usually implement incredibly weak cryptography to include secure cryptographic functions to secure passwords, data and generate secure random data.

CryptoLib boasts:

  • Secure pseudorandom number/hex/string generator with repeatability checker
  • Salted PBKDF2 hashing using alternations between SHA512 and Whirlpool
  • Two-way cascading encryption using Rijndael 256, Twofish and Serpent

CryptoLib requires PHP 7.2.0+ (with OpenSSL). You should always keep your Cryptography plugins up-to-date.

Check out the documentation at: http://cryptolib.ju.je

Examples

Encrypting and decrypting text:

$encrypted = \IcyApril\CryptoLib::encryptData("test data", "test key");
$decrypted = \IcyApril\CryptoLib::decryptData($enc, "test key");

Secure random data generation:

$string = \IcyApril\CryptoLib::randomString(5);
$number = \IcyApril\CryptoLib::randomInt(0, 4096);
$hex = \IcyApril\CryptoLib::randomHex(256);

Hash string and validate:

$hash  = \IcyApril\CryptoLib::hash("test");
$valid = \IcyApril\CryptoLib::validateHash($hash, "test");

Why I Made It

"We have technology but lack philosophy"; this saying holds true in the world of cryptography when merged with PHP. As a software engineer, working with PHP day-in day-out; it is apparent that unskilled developers still implement cryptographic function unsafely in PHP. Whether it is people hashing passwords without salts, weak random number generation or even encryption systems using weak ciphers. Yes, some may hold the view that PHP Developers are not best equipped for this issue, which is why I built CryptoLib. CryptoLib provides cryptographic functions with a degree of security that is exceptional and unique for any single library to be called with just a single line of simple code. CryptoLib exists to make it easy for people to ensure their cryptographic functions in PHP, for example hashing passwords to store them in a database, hold a reasonable degree of cryptographic safety. This class makes this technology accessible to all, whether developers will lift their heads out of the darkness and take advantage of it is another matter.

Version log

  • v0.8 Christmas - Initial version, released on Christmas day 2014.
  • v0.9 Converging - Documentation updates, released 28th December 2014.
  • v1.0 Conqueror - Finally getting around to marking this as v1.
  • v2.0 Calescence - Replaced mcrypt with openssl.

Warning

No encryption system can make something impossible to crack, it can make this very (very, very, very) difficult to crack; cryptography is about creating a puzzle which is mathematically harder to solve than create. This applies to everything cryptographic and this library is no exception, always be careful with encryption when people's lives are on the line.

CryptoLib is version 0.8, this is not nessecarily the finalised code, despite my efforts to ensure it is secure; always be cautious when using it. Also please note that CryptoLib does not guarantee your server is secure.

Terms

CryptoLib is an open-source PHP Cryptography library. Copyright (C) 2014 Junade Ali

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Note

You are required to keep attribution notices to the original author intact.

icyapril/cryptolib 适用场景与选型建议

icyapril/cryptolib 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60.23k 次下载、GitHub Stars 达 34, 最近一次更新时间为 2015 年 06 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 icyapril/cryptolib 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 icyapril/cryptolib 我们能提供哪些服务?
定制开发 / 二次开发

基于 icyapril/cryptolib 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 34
  • Watchers: 2
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL
  • 更新时间: 2015-06-24