encryption - PHP Fatal error: Class 'Defuse\Crypto\Crypto' not found in File -


i'm required use defuse php encryption library located here. upon following install instructions install .phar file, receive following error in log:

[11-sep-2017 02:38:09 europe/berlin] php fatal error:  class 'defuse\crypto\crypto' not found in d:\git repositories\accriviawebapp\code\php\classes\aes.class.php on line 11 

here php file being ran:

// require encryption files require_once 'd:/git repositories/accriviawebapp/code/php/ext/defuse-crypto.phar'; use defuse\crypto\crypto;  class aes {      public static function encrypt($target) {         $key = "12345678910";         return crypto::encryptwithpassword($target, $key);     }      public static function decrypt($target) {         $key = "12345678910";         return crypto::decryptwithpassword($target, $key);     } } 

please note, i've tried relative file path in require_once method no success.

i'm using latest version (as of writing version 2.1.0, have tried version 2.0.2 same issues).

--

if you're wondering phar settings in ini, here's details: here (i wasn't allowed embed images)

i have tried composer method, had no success (same error) either when including vendor/autoload.php file.

edit: php version 5.6.31 (using xampp on windows: xampp_5.6.31).


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -