summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/crypto/crypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib/crypto/crypt.php')
-rw-r--r--apps/encryption/lib/crypto/crypt.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
index dbc0364a157..12e9008545a 100644
--- a/apps/encryption/lib/crypto/crypt.php
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -30,7 +30,6 @@ use OC\Encryption\Exceptions\DecryptionFailedException;
use OC\Encryption\Exceptions\EncryptionFailedException;
use OCA\Encryption\Exceptions\MultiKeyDecryptException;
use OCA\Encryption\Exceptions\MultiKeyEncryptException;
-use OCA\Encryption\Vendor\PBKDF2Fallback;
use OCP\Encryption\Exceptions\GenericEncryptionException;
use OCP\IConfig;
use OCP\ILogger;
@@ -293,28 +292,14 @@ class Crypt {
$salt = hash('sha256', $uid . $instanceId . $instanceSecret, true);
$keySize = $this->getKeySize($cipher);
- if (function_exists('hash_pbkdf2')) {
- $hash = hash_pbkdf2(
- 'sha256',
- $password,
- $salt,
- 100000,
- $keySize,
- true
- );
- } else {
- // fallback to 3rdparty lib for PHP <= 5.4.
- // FIXME: Can be removed as soon as support for PHP 5.4 was dropped
- $fallback = new PBKDF2Fallback();
- $hash = $fallback->pbkdf2(
- 'sha256',
- $password,
- $salt,
- 100000,
- $keySize,
- true
- );
- }
+ $hash = hash_pbkdf2(
+ 'sha256',
+ $password,
+ $salt,
+ 100000,
+ $keySize,
+ true
+ );
return $hash;
}