Skip to content

Commit

Permalink
Support PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Nov 6, 2019
1 parent 55af0dc commit 61502af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
17 changes: 14 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
"name": "paragonie/constant_time_encoding",
"description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
"keywords": [
"base64", "encoding", "rfc4648", "base32", "base16", "hex", "bin2hex", "hex2bin", "base64_encode", "base64_decode", "base32_encode", "base32_decode"
"base64",
"encoding",
"rfc4648",
"base32",
"base16",
"hex",
"bin2hex",
"hex2bin",
"base64_encode",
"base64_decode",
"base32_encode",
"base32_decode"
],
"license": "MIT",
"type": "library",
Expand All @@ -26,11 +37,11 @@
"source": "https://github.com/paragonie/constant_time_encoding"
},
"require": {
"php": "^7"
"php": "^7|^8"
},
"require-dev": {
"phpunit/phpunit": "^6|^7",
"vimeo/psalm": "^1|^2"
"vimeo/psalm": "^1|^2|^3"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 0 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
syntaxCheck="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests</directory>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="Constant Time Encoding Test Suite">
<directory suffix="Test.php">./tests</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Hex.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function decode(string $hexString, bool $strictPadding = false): s
}
}

/** @var array<int, ing> $chunk */
/** @var array<int, int> $chunk */
$chunk = \unpack('C*', $hexString);
while ($hex_pos < $hex_len) {
++$hex_pos;
Expand Down

0 comments on commit 61502af

Please sign in to comment.