diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-04 14:25:47 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-04 14:25:47 +0100 |
commit | e9f0b3002367e34f240405051d842102e01e73c3 (patch) | |
tree | c38aea4158a14b7095471f1e4358c46bb7c9ad50 | |
parent | 884eb1418163ce9a5496061312ce422d29274cbd (diff) | |
parent | ee1f8b0242af2684f35ac85acca86946a2f5b1d5 (diff) | |
download | nextcloud-server-e9f0b3002367e34f240405051d842102e01e73c3.tar.gz nextcloud-server-e9f0b3002367e34f240405051d842102e01e73c3.zip |
Merge pull request #12609 from owncloud/remove-53-fixme
Remove workaround for 5.3
-rw-r--r-- | lib/private/security/crypto.php | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/private/security/crypto.php b/lib/private/security/crypto.php index 498e15d6bc3..6fdff8d92a2 100644 --- a/lib/private/security/crypto.php +++ b/lib/private/security/crypto.php @@ -43,22 +43,6 @@ class Crypto implements ICrypto { } /** - * Custom implementation of hex2bin since the function is only available starting - * with PHP 5.4 - * - * @TODO Remove this once 5.3 support for ownCloud is dropped - * @param $message - * @return string - */ - protected static function hexToBin($message) { - if (function_exists('hex2bin')) { - return hex2bin($message); - } - - return pack("H*", $message); - } - - /** * @param string $message The message to authenticate * @param string $password Password to use (defaults to `secret` in config.php) * @return string Calculated HMAC @@ -115,9 +99,9 @@ class Crypto implements ICrypto { throw new \Exception('Authenticated ciphertext could not be decoded.'); } - $ciphertext = self::hexToBin($parts[0]); + $ciphertext = hex2bin($parts[0]); $iv = $parts[1]; - $hmac = self::hexToBin($parts[2]); + $hmac = hex2bin($parts[2]); $this->cipher->setIV($iv); |