From f1ab2f022fdc780aca0944d90e9a0e844a0820d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:12:17 +0200 Subject: =?UTF-8?q?2024-02-19:=20popravljen=20(prej=C5=A1nji=20commit=20je?= =?UTF-8?q?=20napa=C4=8Den)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodium_compat/.github/workflows/ci.yml | 96 ---------- vendor/paragonie/sodium_compat/.gitignore | 9 - vendor/paragonie/sodium_compat/appveyor.yml | 27 --- vendor/paragonie/sodium_compat/autoload-fast.php | 4 - .../paragonie/sodium_compat/autoload-pedantic.php | 6 - .../paragonie/sodium_compat/autoload-phpunit.php | 8 - vendor/paragonie/sodium_compat/build-phar.sh | 8 - vendor/paragonie/sodium_compat/dist/Makefile | 39 ---- vendor/paragonie/sodium_compat/dist/box.json | 32 ---- vendor/paragonie/sodium_compat/phpunit.xml.dist | 16 -- vendor/paragonie/sodium_compat/psalm-above-3.xml | 57 ------ vendor/paragonie/sodium_compat/psalm-below-3.xml | 43 ----- .../sodium_compat/src/Core/Base64/Common.php | 213 --------------------- 13 files changed, 558 deletions(-) delete mode 100644 vendor/paragonie/sodium_compat/.github/workflows/ci.yml delete mode 100644 vendor/paragonie/sodium_compat/.gitignore delete mode 100644 vendor/paragonie/sodium_compat/appveyor.yml delete mode 100644 vendor/paragonie/sodium_compat/autoload-fast.php delete mode 100644 vendor/paragonie/sodium_compat/autoload-pedantic.php delete mode 100644 vendor/paragonie/sodium_compat/autoload-phpunit.php delete mode 100644 vendor/paragonie/sodium_compat/build-phar.sh delete mode 100644 vendor/paragonie/sodium_compat/dist/Makefile delete mode 100644 vendor/paragonie/sodium_compat/dist/box.json delete mode 100644 vendor/paragonie/sodium_compat/phpunit.xml.dist delete mode 100644 vendor/paragonie/sodium_compat/psalm-above-3.xml delete mode 100644 vendor/paragonie/sodium_compat/psalm-below-3.xml delete mode 100644 vendor/paragonie/sodium_compat/src/Core/Base64/Common.php (limited to 'vendor/paragonie/sodium_compat') diff --git a/vendor/paragonie/sodium_compat/.github/workflows/ci.yml b/vendor/paragonie/sodium_compat/.github/workflows/ci.yml deleted file mode 100644 index f570b84..0000000 --- a/vendor/paragonie/sodium_compat/.github/workflows/ci.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: CI - -on: [push] - -jobs: - old: - name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: ['ubuntu-16.04'] - php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0'] - phpunit-versions: ['7.5.20'] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, intl - ini-values: post_max_size=256M, max_execution_time=180 - tools: psalm, phpunit:${{ matrix.phpunit-versions }} - - - name: Install dependencies - run: composer self-update --1; composer install - - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - with: - memory_limit: 256M - - moderate: - name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: ['ubuntu-latest'] - php-versions: ['7.1', '7.2', '7.3'] - phpunit-versions: ['latest'] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, intl, sodium - ini-values: post_max_size=256M, max_execution_time=180 - tools: psalm, phpunit:${{ matrix.phpunit-versions }} - - - name: Install dependencies - run: composer install - - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 - with: - memory_limit: 256M - - modern: - name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: ['ubuntu-latest'] - php-versions: ['7.4', '8.0'] - phpunit-versions: ['latest'] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, intl, sodium - ini-values: post_max_size=256M, max_execution_time=180 - tools: psalm, phpunit:${{ matrix.phpunit-versions }} - - - name: Install dependencies - run: composer install - - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 - with: - memory_limit: 256M - - - name: Install Psalm - run: composer require --dev vimeo/psalm:^4; cp psalm-above-3.xml psalm.xml - - - name: Static Analysis - run: vendor/bin/psalm diff --git a/vendor/paragonie/sodium_compat/.gitignore b/vendor/paragonie/sodium_compat/.gitignore deleted file mode 100644 index 0df5a6d..0000000 --- a/vendor/paragonie/sodium_compat/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/.idea/ -/.php_cs.cache -/.phpunit.result.cache -/box/ -/dist/sodium-compat.phar -/dist/sodium-compat.phar.sig -/composer.lock -/vendor/ -/psalm.xml diff --git a/vendor/paragonie/sodium_compat/appveyor.yml b/vendor/paragonie/sodium_compat/appveyor.yml deleted file mode 100644 index 9621e9a..0000000 --- a/vendor/paragonie/sodium_compat/appveyor.yml +++ /dev/null @@ -1,27 +0,0 @@ -build: false -shallow_clone: false -platform: - - x86 - - x64 -clone_folder: C:\projects\sodium_compat -image: Visual Studio 2017 - -install: - - cinst -y OpenSSL.Light - - SET PATH=C:\Program Files\OpenSSL;%PATH% - - sc config wuauserv start= auto - - net start wuauserv - - cinst -y php --version 5.6.30 - - cd c:\tools\php56 - - copy php.ini-production php.ini - - echo date.timezone="UTC" >> php.ini - - echo extension_dir=ext >> php.ini - - echo extension=php_openssl.dll >> php.ini - - cd C:\projects\sodium_compat - - SET PATH=C:\tools\php56;%PATH% - - php.exe -r "readfile('http://getcomposer.org/installer');" | php.exe - - php.exe composer.phar install --prefer-source --no-interaction - -test_script: - - cd C:\projects\sodium_compat - - vendor\bin\phpunit.bat tests/Windows32Test.php diff --git a/vendor/paragonie/sodium_compat/autoload-fast.php b/vendor/paragonie/sodium_compat/autoload-fast.php deleted file mode 100644 index 08724d1..0000000 --- a/vendor/paragonie/sodium_compat/autoload-fast.php +++ /dev/null @@ -1,4 +0,0 @@ -= 50300) { - require_once (dirname(__FILE__) . '/tests/phpunit-shim.php'); -} -require_once (dirname(__FILE__) . '/autoload.php'); diff --git a/vendor/paragonie/sodium_compat/build-phar.sh b/vendor/paragonie/sodium_compat/build-phar.sh deleted file mode 100644 index 380eee6..0000000 --- a/vendor/paragonie/sodium_compat/build-phar.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -curl -LSs https://box-project.github.io/box2/installer.php | php -mkdir ~/box -mv box.phar ~/box/box -PATH=$PATH:~/box/ make -C dist/ build-phar -# PATH=$PATH:~/box/ make -C dist/ sign-phar - diff --git a/vendor/paragonie/sodium_compat/dist/Makefile b/vendor/paragonie/sodium_compat/dist/Makefile deleted file mode 100644 index f30a25d..0000000 --- a/vendor/paragonie/sodium_compat/dist/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# This builds sodium-compat.phar. To run this Makefile, `box` and `composer` -# must be installed and in your $PATH. Run it from inside the dist/ directory. - -box := $(shell which box) -composer := "composer" -gitcommit := $(shell git rev-parse HEAD) - -.PHONY: all -all: build-phar - -.PHONY: sign-phar -sign-phar: - gpg -u 7F52D5C61D1255C731362E826B97A1C2826404DA --armor --output sodium-compat.phar.sig --detach-sig sodium-compat.phar - -# ensure we run in clean tree. export git tree and run there. -.PHONY: build-phar -build-phar: - @echo "Creating .phar from revision $(shell git rev-parse HEAD)." - rm -rf worktree - install -d worktree - (cd $(CURDIR)/..; git archive HEAD) | tar -x -C worktree - $(MAKE) -f $(CURDIR)/Makefile -C worktree sodium-compat.phar - mv worktree/*.phar . - rm -rf worktree - -.PHONY: clean -clean: - rm -vf sodium-compat.phar sodium-compat.phar.sig - -# Inside workdir/: - -sodium-compat.phar: dist/box.json composer.lock - cp dist/box.json . - php -d phar.readonly=0 $(box) build -c box.json -v - -composer.lock: - $(composer) config autoloader-suffix $(gitcommit) - $(composer) install --no-dev - diff --git a/vendor/paragonie/sodium_compat/dist/box.json b/vendor/paragonie/sodium_compat/dist/box.json deleted file mode 100644 index 5f7827e..0000000 --- a/vendor/paragonie/sodium_compat/dist/box.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "chmod": "0755", - "finder": [ - { - "in": "", - "name": "autoload.php" - }, - { - "in": "src", - "name": "*.php" - }, - { - "in": "lib", - "name": "*.php" - }, - { - "in": "vendor/composer", - "name": "*.php" - }, - { - "in": "vendor/paragonie", - "name": "*.php" - } - ], - "compactors": [ - "Herrera\\Box\\Compactor\\Php" - ], - "main": "vendor/autoload.php", - "output": "sodium-compat.phar", - "shebang": false, - "stub": true -} diff --git a/vendor/paragonie/sodium_compat/phpunit.xml.dist b/vendor/paragonie/sodium_compat/phpunit.xml.dist deleted file mode 100644 index a705527..0000000 --- a/vendor/paragonie/sodium_compat/phpunit.xml.dist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - ./src - - - - - ./tests/unit - - - ./tests/compat - - - diff --git a/vendor/paragonie/sodium_compat/psalm-above-3.xml b/vendor/paragonie/sodium_compat/psalm-above-3.xml deleted file mode 100644 index 63b8c80..0000000 --- a/vendor/paragonie/sodium_compat/psalm-above-3.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/paragonie/sodium_compat/psalm-below-3.xml b/vendor/paragonie/sodium_compat/psalm-below-3.xml deleted file mode 100644 index 0da3cd9..0000000 --- a/vendor/paragonie/sodium_compat/psalm-below-3.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/paragonie/sodium_compat/src/Core/Base64/Common.php b/vendor/paragonie/sodium_compat/src/Core/Base64/Common.php deleted file mode 100644 index 94b2e8f..0000000 --- a/vendor/paragonie/sodium_compat/src/Core/Base64/Common.php +++ /dev/null @@ -1,213 +0,0 @@ - $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 3)); - $b0 = $chunk[1]; - $b1 = $chunk[2]; - $b2 = $chunk[3]; - - $dest .= - self::encode6Bits( $b0 >> 2 ) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits((($b1 << 2) | ($b2 >> 6)) & 63) . - self::encode6Bits( $b2 & 63); - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $b0 = $chunk[1]; - if ($i + 1 < $srcLen) { - $b1 = $chunk[2]; - $dest .= - self::encode6Bits($b0 >> 2) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits(($b1 << 2) & 63); - if ($pad) { - $dest .= '='; - } - } else { - $dest .= - self::encode6Bits( $b0 >> 2) . - self::encode6Bits(($b0 << 4) & 63); - if ($pad) { - $dest .= '=='; - } - } - } - return $dest; - } - - /** - * decode from base64 into binary - * - * Base64 character set "./[A-Z][a-z][0-9]" - * - * @param string $src - * @param bool $strictPadding - * @return string - * @throws RangeException - * @throws TypeError - * @psalm-suppress RedundantCondition - */ - public static function decode($src, $strictPadding = false) - { - // Remove padding - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - if ($srcLen === 0) { - return ''; - } - - if ($strictPadding) { - if (($srcLen & 3) === 0) { - if ($src[$srcLen - 1] === '=') { - $srcLen--; - if ($src[$srcLen - 1] === '=') { - $srcLen--; - } - } - } - if (($srcLen & 3) === 1) { - throw new RangeException( - 'Incorrect padding' - ); - } - if ($src[$srcLen - 1] === '=') { - throw new RangeException( - 'Incorrect padding' - ); - } - } else { - $src = rtrim($src, '='); - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - } - - $err = 0; - $dest = ''; - // Main loop (no padding): - for ($i = 0; $i + 4 <= $srcLen; $i += 4) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 4)); - $c0 = self::decode6Bits($chunk[1]); - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $c3 = self::decode6Bits($chunk[4]); - - $dest .= pack( - 'CCC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff), - ((($c2 << 6) | $c3 ) & 0xff) - ); - $err |= ($c0 | $c1 | $c2 | $c3) >> 8; - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $c0 = self::decode6Bits($chunk[1]); - - if ($i + 2 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $dest .= pack( - 'CC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff) - ); - $err |= ($c0 | $c1 | $c2) >> 8; - } elseif ($i + 1 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $dest .= pack( - 'C', - ((($c0 << 2) | ($c1 >> 4)) & 0xff) - ); - $err |= ($c0 | $c1) >> 8; - } elseif ($i < $srcLen && $strictPadding) { - $err |= 1; - } - } - /** @var bool $check */ - $check = ($err === 0); - if (!$check) { - throw new RangeException( - 'Base64::decode() only expects characters in the correct base64 alphabet' - ); - } - return $dest; - } - - /** - * Uses bitwise operators instead of table-lookups to turn 6-bit integers - * into 8-bit integers. - * - * Base64 character set: - * [A-Z] [a-z] [0-9] + / - * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f - * - * @param int $src - * @return int - */ - abstract protected static function decode6Bits($src); - - /** - * Uses bitwise operators instead of table-lookups to turn 8-bit integers - * into 6-bit integers. - * - * @param int $src - * @return string - */ - abstract protected static function encode6Bits($src); -} -- cgit v1.2.3