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執行)僅調用腳本一次。