diff --git a/.travis.yml b/.travis.yml index 367d99f..dc1b6ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ matrix: before_install: - export ALLOW_FAILURE=1; if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then export ALLOW_FAILURE=0; fi - - if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then yes '' | pecl install mcrypt-1.0.2; fi install: - composer self-update diff --git a/composer.json b/composer.json index 02b2881..635db3c 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,9 @@ "source": "https://github.com/robinpowered/php-ntlm" }, "require": { - "php-64bit": ">=7.1.0" + "php-64bit": ">=8.3.0" }, "require-dev": { - "ext-mcrypt": "*", "ext-hash": "*", "ext-mbstring": "*", "ext-iconv": "*", diff --git a/src/Robin/Ntlm/Crypt/Des/McryptDesEncrypter.php b/src/Robin/Ntlm/Crypt/Des/McryptDesEncrypter.php deleted file mode 100644 index 7b0d205..0000000 --- a/src/Robin/Ntlm/Crypt/Des/McryptDesEncrypter.php +++ /dev/null @@ -1,70 +0,0 @@ - MCRYPT_MODE_CBC, - CipherMode::CFB => MCRYPT_MODE_CFB, - CipherMode::ECB => MCRYPT_MODE_ECB, - CipherMode::OFB => MCRYPT_MODE_OFB, - ]; - - - /** - * Methods - */ - - /** - * {@inheritDoc} - */ - public function encrypt($key, $data, $mode, $initialization_vector) - { - if (isset(self::$cipher_mode_map[$mode])) { - $mode = self::$cipher_mode_map[$mode]; - } else { - throw new InvalidArgumentException('Unknown cipher mode "'. $mode .'"'); - } - - $key = $this->processKey($key); - - $encrypted = mcrypt_encrypt(MCRYPT_DES, $key, $data, $mode, $initialization_vector); - - if (false === $encrypted) { - throw CryptographicFailureException::forReasonCode( - CryptographicFailureException::CODE_FOR_ENCRYPTION_FAILURE - ); - } - - return $encrypted; - } -} diff --git a/src/Robin/Ntlm/Crypt/Random/McryptRandomByteGenerator.php b/src/Robin/Ntlm/Crypt/Random/McryptRandomByteGenerator.php deleted file mode 100644 index d1ca9f6..0000000 --- a/src/Robin/Ntlm/Crypt/Random/McryptRandomByteGenerator.php +++ /dev/null @@ -1,90 +0,0 @@ -source = $source; - } - - /** - * {@inheritDoc} - * - * @deprecated This implementation is deprecated, as the mcrypt - * library is abandoned. Use {@link NativeRandomByteGenerator} instead. - */ - public function generate($size) - { - trigger_error( - 'This implementation is deprecated, as the mcrypt library is abandoned', - E_USER_DEPRECATED - ); - - $generated = mcrypt_create_iv($size, $this->source); - - if (false === $generated || strlen($generated) !== $size) { - throw CryptographicFailureException::forReasonCode( - CryptographicFailureException::CODE_FOR_RANDOM_DATA_GENERATION_FAILURE - ); - } - - return $generated; - } -}