CryptoManana
v1.1.2


Cryptomañana(Cryptomanana)是PHP加密框架,可提供面向对象的解决方案来提高项目的安全性。该项目的代码基础遵循固体/亲吻/干燥原则,并实施了一些流行的软件设计模式。该软件框架提供了一个功能齐全的加密模型,并具有许多密码图,协议和服务。它对于安全的哈希,加密,密钥交换,数据签名,随机数据生成等非常有用。 Cryptomañana在这里使您的开发更快,更安全!
开发人员:Tony Karavasilev
# Install the package at your project via Composer
composer require karavasilev/cryptomanana
# Optionally, check if your system is well-configured
php vendor/karavasilev/cryptomanana/check.php
# Or: ./vendor/karavasilev/cryptomanana/check PHP Version :5.5、5.6、7.0、7.1、7.2、7.3、7.4、8.0、8.1、8.2或8.3;spl扩展(带有php> = 5.0.0的捆绑包,添加到Core,因为PHP> = 5.3.0);hash扩展(与php> = 5.1.2捆绑在一起,添加到核心,因为php> = 7.4.0);openssl扩展名(默认为PHP> = 5.0.0,需要OpenSSL库);OpenSSL Library带有许多操作系统和灯服务器;Composer Dependency Manager通过src/autoload.php ;libsodium或sodium , mbstring , zend-opcache和apcu 。 Cryptomañana框架-DOI 10.5281/Zenodo.2604693 (作为概念)
git clone --depth=1 https://github.com/TonyKaravasilev/CryptoManana.git
cd CryptoManana && composer install --profile
vendor/bin/phpunit --testdox --no-coverage
vendor/bin/phpcs注意:不要忘记在php.ini配置文件上设置sys_temp_dir或upload_tmp_dir位置。
mbstring PHP扩展; // Autoload packages via Composer class autoloader
require ' vendor ' . DIRECTORY_SEPARATOR . ' autoload.php ' ;
// Configure PHP internal encoding (default is `UTF-8` for PHP >= 5.6)
ini_set ( ' default_charset ' , ' UTF-8 ' );
// Configure `mbstring` to use your favourite UTF-8 encoding
mb_regex_encoding ( ' UTF-8 ' );
mb_internal_encoding ( ' UTF-8 ' );
mb_http_output ( ' UTF-8 ' );
// Enable the `mbstring` support for CryptoManana components
CryptoManana Core StringBuilder:: useMbString ( true );
// Start coding hard...注意:该框架无需扩展而起作用,并且由于绩效原因,默认情况下不启用其使用。
默认情况下,Cryptomanana框架为不同的旧PHP版本(Polyfill)提供了兼容性。您可以通过恒定定义禁用兼容性检查(位于src/compatibility.php )。禁用此功能的原因没有很多,但是您可能需要自己/其他逻辑等。必须在自动加载之前或一类使用之前定义全局常数(访问),例如:
define ( ' CRYPTO_MANANA_COMPATIBILITY_OFF ' , true ); // const CRYPTO_MANANA_COMPATIBILITY_OFF = 1;注意:在大多数情况下,您无需这样做。每个HTTP请求(或CLI执行)仅调用脚本一次。