From da365be5a2011bcb7939130fa60320f7d7198ed0 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 24 Jun 2016 14:49:52 +0200 Subject: [PATCH] ParagonIE\ConstantTime required PHP7, going to v1.x branch --- extlib/ParagonIE/ConstantTime/Base32.php | 57 +++++++------- extlib/ParagonIE/ConstantTime/Base32Hex.php | 9 +-- extlib/ParagonIE/ConstantTime/Base64.php | 19 ++--- .../ParagonIE/ConstantTime/Base64DotSlash.php | 5 +- .../ConstantTime/Base64DotSlashOrdered.php | 5 +- .../ParagonIE/ConstantTime/Base64UrlSafe.php | 5 +- extlib/ParagonIE/ConstantTime/Binary.php | 9 +-- .../ConstantTime/EncoderInterface.php | 10 +-- extlib/ParagonIE/ConstantTime/Encoding.php | 45 ++++++----- extlib/ParagonIE/ConstantTime/Hex.php | 23 ++---- extlib/ParagonIE/ConstantTime/RFC4648.php | 31 ++++---- extlib/ParagonIE/README.md | 74 +++++++++++++++++++ 12 files changed, 167 insertions(+), 125 deletions(-) create mode 100644 extlib/ParagonIE/README.md diff --git a/extlib/ParagonIE/ConstantTime/Base32.php b/extlib/ParagonIE/ConstantTime/Base32.php index a65c1c7343..28b8ca200e 100644 --- a/extlib/ParagonIE/ConstantTime/Base32.php +++ b/extlib/ParagonIE/ConstantTime/Base32.php @@ -1,5 +1,4 @@ > 2)) & 0xff) ); $err |= ($c0 | $c1 | $c2) >> 8; - } elseif ($i + 1 < $srcLen) { + } elseif($i + 1 < $srcLen) { $c1 = static::decode6Bits($chunk[2]); $dest .= \pack( 'C', @@ -179,7 +170,7 @@ abstract class Base64 implements EncoderInterface * @param int $src * @return int */ - protected static function decode6Bits(int $src): int + protected static function decode6Bits($src) { $ret = -1; @@ -208,7 +199,7 @@ abstract class Base64 implements EncoderInterface * @param int $src * @return string */ - protected static function encode6Bits(int $src): string + protected static function encode6Bits($src) { $diff = 0x41; diff --git a/extlib/ParagonIE/ConstantTime/Base64DotSlash.php b/extlib/ParagonIE/ConstantTime/Base64DotSlash.php index 7f975139b1..160459782e 100644 --- a/extlib/ParagonIE/ConstantTime/Base64DotSlash.php +++ b/extlib/ParagonIE/ConstantTime/Base64DotSlash.php @@ -1,5 +1,4 @@