X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fcrypto%2Fclass_CryptoHelper.php;h=1bf22a341543eae677c2a64549013fa942f18bb5;hp=b404317243265d7960599e4d6da74e96c109448d;hb=b002c5909aa0f781505dde5414964b0f014cde01;hpb=146c8b3c929a1b0ab17d6605e5ae949ac44899c1 diff --git a/framework/main/classes/crypto/class_CryptoHelper.php b/framework/main/classes/crypto/class_CryptoHelper.php index b4043172..1bf22a34 100644 --- a/framework/main/classes/crypto/class_CryptoHelper.php +++ b/framework/main/classes/crypto/class_CryptoHelper.php @@ -1,11 +1,11 @@ isPhpExtensionLoaded('mcrypt')) { // Then use it - $this->cryptoStreamInstance = ObjectFactory::createObjectByName('McryptStream', array($this->getRngInstance())); + $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\McryptStream', array($this->getRngInstance())); + } elseif ($this->isPhpExtensionLoaded('openssl')) { + // Then use it + $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\OpenSslStream', array($this->getRngInstance())); } else { // If nothing works ... - $this->cryptoStreamInstance = ObjectFactory::createObjectByName('NullCryptoStream'); + $this->cryptoStreamInstance = ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Stream\Crypto\NullCryptoStream'); } }