From 5d2896a69702edbe8efd365013b5995e6dd4897d Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 15 Feb 2024 06:34:48 -0500 Subject: [PATCH] XOR Support (#47) * build: add dependency on ext-gmp * feat: add ability to xor strings * test: assert xor works * docs: add "app:xor-string" --- tool/README.md | 1 + tool/app/Commands/XorString.php | 28 ++ tool/composer.json | 5 +- tool/composer.lock | 413 +++++++++++++-------------- tool/tests/Feature/XorStringTest.php | 32 +++ 5 files changed, 262 insertions(+), 217 deletions(-) create mode 100644 tool/app/Commands/XorString.php create mode 100644 tool/tests/Feature/XorStringTest.php diff --git a/tool/README.md b/tool/README.md index a7ff5d4..3b09db4 100644 --- a/tool/README.md +++ b/tool/README.md @@ -11,3 +11,4 @@ _Liber Primus decoding._ * `php cicada app:to-runic` - Converts a string to runic. * `php cicada app:translate` - Translation from runic to English using Gematria values. * `php cicada app:vigenere` - Decodes a Vigenere cipher using a key and skip indexes from Gematria values. +* `php cicada app:xor-string` - XORs a string with a key. diff --git a/tool/app/Commands/XorString.php b/tool/app/Commands/XorString.php new file mode 100644 index 0000000..39f14e1 --- /dev/null +++ b/tool/app/Commands/XorString.php @@ -0,0 +1,28 @@ +ask('Enter a string to XOR'); + $key = $this->ask('Enter the key.'); + + $xor1 = gmp_init($string, 16); + $xor2 = gmp_init($key, 16); + + $xor = gmp_xor($xor1, $xor2); + $output = pack('H*', gmp_strval($xor, 16)); + + $this->output->write('XOR: '.$output.PHP_EOL); + + return self::SUCCESS; + } +} diff --git a/tool/composer.json b/tool/composer.json index 0dc71a7..a893b0d 100644 --- a/tool/composer.json +++ b/tool/composer.json @@ -5,6 +5,7 @@ "license": "MIT", "require": { "php": "^8.1", + "ext-gmp": "*", "drupol/phpermutations": "^1.4", "laravel-zero/framework": "^10.2", "league/csv": "^9.0", @@ -17,9 +18,7 @@ }, "autoload": { "psr-4": { - "App\\": "app/", - "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" + "App\\": "app/" } }, "autoload-dev": { diff --git a/tool/composer.lock b/tool/composer.lock index 2bad913..431dafe 100644 --- a/tool/composer.lock +++ b/tool/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c47dd4bf637960f065b878f43ab2ebe", + "content-hash": "9edf83c43f3292407285d7c4f55189c2", "packages": [ { "name": "brick/math", @@ -63,16 +63,16 @@ }, { "name": "carbonphp/carbon-doctrine-types", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "a31d3358a2a5d6ae947df1691d1f321418a5f3d5" + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/a31d3358a2a5d6ae947df1691d1f321418a5f3d5", - "reference": "a31d3358a2a5d6ae947df1691d1f321418a5f3d5", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", "shasum": "" }, "require": { @@ -112,7 +112,7 @@ ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.1.0" + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" }, "funding": [ { @@ -128,7 +128,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T15:33:53+00:00" + "time": "2024-02-09T16:56:22+00:00" }, { "name": "doctrine/inflector", @@ -480,7 +480,7 @@ }, { "name": "illuminate/bus", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", @@ -533,16 +533,16 @@ }, { "name": "illuminate/cache", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", - "reference": "0301e5c583073ed4cad411df0c765ae57465cdc0" + "reference": "144739bd3e7631a465c8adbfb3361d37b9e79d23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/0301e5c583073ed4cad411df0c765ae57465cdc0", - "reference": "0301e5c583073ed4cad411df0c765ae57465cdc0", + "url": "https://api.github.com/repos/illuminate/cache/zipball/144739bd3e7631a465c8adbfb3361d37b9e79d23", + "reference": "144739bd3e7631a465c8adbfb3361d37b9e79d23", "shasum": "" }, "require": { @@ -591,20 +591,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-06T19:14:05+00:00" + "time": "2024-01-30T15:48:38+00:00" }, { "name": "illuminate/collections", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "221c1ee944cb20ed807a8a5e8668552d6ca736ff" + "reference": "5cedaba39e331cffd73a01cf27ea83229fa11fba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/221c1ee944cb20ed807a8a5e8668552d6ca736ff", - "reference": "221c1ee944cb20ed807a8a5e8668552d6ca736ff", + "url": "https://api.github.com/repos/illuminate/collections/zipball/5cedaba39e331cffd73a01cf27ea83229fa11fba", + "reference": "5cedaba39e331cffd73a01cf27ea83229fa11fba", "shasum": "" }, "require": { @@ -646,11 +646,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-22T13:55:20+00:00" + "time": "2024-02-09T15:56:19+00:00" }, { "name": "illuminate/conditionable", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -696,7 +696,7 @@ }, { "name": "illuminate/config", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", @@ -744,16 +744,16 @@ }, { "name": "illuminate/console", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "689a7995aa24a52fdd1027b80f973ebf592dd94e" + "reference": "6866cbd6b37480f09640930c29985e61244a9df3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/689a7995aa24a52fdd1027b80f973ebf592dd94e", - "reference": "689a7995aa24a52fdd1027b80f973ebf592dd94e", + "url": "https://api.github.com/repos/illuminate/console/zipball/6866cbd6b37480f09640930c29985e61244a9df3", + "reference": "6866cbd6b37480f09640930c29985e61244a9df3", "shasum": "" }, "require": { @@ -805,11 +805,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-16T00:22:35+00:00" + "time": "2024-02-11T18:31:24+00:00" }, { "name": "illuminate/container", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -860,7 +860,7 @@ }, { "name": "illuminate/contracts", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -908,7 +908,7 @@ }, { "name": "illuminate/events", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", @@ -963,16 +963,16 @@ }, { "name": "illuminate/filesystem", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "782e0bf05709f8b0395f54174ce0b66334324eea" + "reference": "43cd2a29c96f447bad57332a66dac645f026b917" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/782e0bf05709f8b0395f54174ce0b66334324eea", - "reference": "782e0bf05709f8b0395f54174ce0b66334324eea", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/43cd2a29c96f447bad57332a66dac645f026b917", + "reference": "43cd2a29c96f447bad57332a66dac645f026b917", "shasum": "" }, "require": { @@ -1026,11 +1026,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-17T15:07:27+00:00" + "time": "2024-01-30T03:11:34+00:00" }, { "name": "illuminate/macroable", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -1076,7 +1076,7 @@ }, { "name": "illuminate/pipeline", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -1124,7 +1124,7 @@ }, { "name": "illuminate/process", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/process.git", @@ -1175,16 +1175,16 @@ }, { "name": "illuminate/support", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "11a87daf9c4bef3d654c853161b34e11a6ca0618" + "reference": "d757670dcd91b0125d0f3ab82a38cc2ad39d2acf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/11a87daf9c4bef3d654c853161b34e11a6ca0618", - "reference": "11a87daf9c4bef3d654c853161b34e11a6ca0618", + "url": "https://api.github.com/repos/illuminate/support/zipball/d757670dcd91b0125d0f3ab82a38cc2ad39d2acf", + "reference": "d757670dcd91b0125d0f3ab82a38cc2ad39d2acf", "shasum": "" }, "require": { @@ -1242,20 +1242,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-22T18:45:06+00:00" + "time": "2024-02-13T14:50:39+00:00" }, { "name": "illuminate/testing", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/testing.git", - "reference": "effc485962e96c4abfd3b54159a2128a45b5a1fd" + "reference": "5e5f0d8a30cae66f8383098bee623cc75b60af8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/testing/zipball/effc485962e96c4abfd3b54159a2128a45b5a1fd", - "reference": "effc485962e96c4abfd3b54159a2128a45b5a1fd", + "url": "https://api.github.com/repos/illuminate/testing/zipball/5e5f0d8a30cae66f8383098bee623cc75b60af8c", + "reference": "5e5f0d8a30cae66f8383098bee623cc75b60af8c", "shasum": "" }, "require": { @@ -1301,20 +1301,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-09T21:33:53+00:00" + "time": "2024-02-08T15:10:07+00:00" }, { "name": "illuminate/view", - "version": "v10.42.0", + "version": "v10.44.0", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "0e7f86ec6043bd161feb2ddfaa6427b57fefc81b" + "reference": "420a39ec1b835692ec3ed737357bdaa2f03abfe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/0e7f86ec6043bd161feb2ddfaa6427b57fefc81b", - "reference": "0e7f86ec6043bd161feb2ddfaa6427b57fefc81b", + "url": "https://api.github.com/repos/illuminate/view/zipball/420a39ec1b835692ec3ed737357bdaa2f03abfe5", + "reference": "420a39ec1b835692ec3ed737357bdaa2f03abfe5", "shasum": "" }, "require": { @@ -1355,7 +1355,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-09T19:24:03+00:00" + "time": "2024-02-09T16:25:46+00:00" }, { "name": "jolicode/jolinotif", @@ -1770,16 +1770,16 @@ }, { "name": "league/flysystem", - "version": "3.23.1", + "version": "3.24.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e" + "reference": "b25a361508c407563b34fac6f64a8a17a8819675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b25a361508c407563b34fac6f64a8a17a8819675", + "reference": "b25a361508c407563b34fac6f64a8a17a8819675", "shasum": "" }, "require": { @@ -1799,7 +1799,7 @@ "require-dev": { "async-aws/s3": "^1.5 || ^2.0", "async-aws/simple-s3": "^1.1 || ^2.0", - "aws/aws-sdk-php": "^3.220.0", + "aws/aws-sdk-php": "^3.295.10", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", @@ -1810,7 +1810,7 @@ "phpseclib/phpseclib": "^3.0.34", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", - "sabre/dav": "^4.3.1" + "sabre/dav": "^4.6.0" }, "type": "library", "autoload": { @@ -1844,7 +1844,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.23.1" + "source": "https://github.com/thephpleague/flysystem/tree/3.24.0" }, "funding": [ { @@ -1856,7 +1856,7 @@ "type": "github" } ], - "time": "2024-01-26T18:42:03+00:00" + "time": "2024-02-04T12:10:17+00:00" }, { "name": "league/flysystem-local", @@ -1920,16 +1920,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.14.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "b6a5854368533df0295c5761a0253656a2e52d9e" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b6a5854368533df0295c5761a0253656a2e52d9e", - "reference": "b6a5854368533df0295c5761a0253656a2e52d9e", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { @@ -1960,7 +1960,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.14.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -1972,20 +1972,20 @@ "type": "tidelift" } ], - "time": "2023-10-17T14:13:20+00:00" + "time": "2024-01-28T23:22:08+00:00" }, { "name": "nesbot/carbon", - "version": "2.72.2", + "version": "2.72.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "3e7edc41b58d65509baeb0d4a14c8fa41d627130" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e7edc41b58d65509baeb0d4a14c8fa41d627130", - "reference": "3e7edc41b58d65509baeb0d4a14c8fa41d627130", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { @@ -2079,7 +2079,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T00:21:53+00:00" + "time": "2024-01-25T10:35:09+00:00" }, { "name": "nunomaduro/collision", @@ -2967,16 +2967,16 @@ }, { "name": "symfony/console", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", + "url": "https://api.github.com/repos/symfony/console/zipball/2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", "shasum": "" }, "require": { @@ -3041,7 +3041,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.2" + "source": "https://github.com/symfony/console/tree/v6.4.3" }, "funding": [ { @@ -3057,7 +3057,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3128,16 +3128,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788" + "reference": "6dc3c76a278b77f01d864a6005d640822c6f26a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c873490a1c97b3a0a4838afc36ff36c112d02788", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/6dc3c76a278b77f01d864a6005d640822c6f26a6", + "reference": "6dc3c76a278b77f01d864a6005d640822c6f26a6", "shasum": "" }, "require": { @@ -3183,7 +3183,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.0" + "source": "https://github.com/symfony/error-handler/tree/v6.4.3" }, "funding": [ { @@ -3199,20 +3199,20 @@ "type": "tidelift" } ], - "time": "2023-10-18T09:43:34+00:00" + "time": "2024-01-29T15:40:36+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "e95216850555cd55e71b857eb9d6c2674124603a" + "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e95216850555cd55e71b857eb9d6c2674124603a", - "reference": "e95216850555cd55e71b857eb9d6c2674124603a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae9d3a6f3003a6caf56acd7466d8d52378d44fef", + "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef", "shasum": "" }, "require": { @@ -3263,7 +3263,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.3" }, "funding": [ { @@ -3279,7 +3279,7 @@ "type": "tidelift" } ], - "time": "2023-12-27T22:16:42+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3423,16 +3423,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -3446,9 +3446,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3485,7 +3482,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -3501,20 +3498,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -3525,9 +3522,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3566,7 +3560,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -3582,20 +3576,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -3606,9 +3600,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3650,7 +3641,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -3666,20 +3657,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -3693,9 +3684,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3733,7 +3721,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -3749,20 +3737,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -3770,9 +3758,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3816,7 +3801,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -3832,20 +3817,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" + "reference": "31642b0818bfcff85930344ef93193f8c607e0a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", - "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", + "url": "https://api.github.com/repos/symfony/process/zipball/31642b0818bfcff85930344ef93193f8c607e0a3", + "reference": "31642b0818bfcff85930344ef93193f8c607e0a3", "shasum": "" }, "require": { @@ -3877,7 +3862,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.2" + "source": "https://github.com/symfony/process/tree/v6.4.3" }, "funding": [ { @@ -3893,7 +3878,7 @@ "type": "tidelift" } ], - "time": "2023-12-22T16:42:54+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/service-contracts", @@ -3979,16 +3964,16 @@ }, { "name": "symfony/string", - "version": "v7.0.2", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", - "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", + "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", "shasum": "" }, "require": { @@ -4045,7 +4030,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.2" + "source": "https://github.com/symfony/string/tree/v7.0.3" }, "funding": [ { @@ -4061,20 +4046,20 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:54:46+00:00" + "time": "2024-01-29T15:41:16+00:00" }, { "name": "symfony/translation", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681" + "reference": "637c51191b6b184184bbf98937702bcf554f7d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", - "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", + "url": "https://api.github.com/repos/symfony/translation/zipball/637c51191b6b184184bbf98937702bcf554f7d04", + "reference": "637c51191b6b184184bbf98937702bcf554f7d04", "shasum": "" }, "require": { @@ -4097,7 +4082,7 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", "symfony/config": "^5.4|^6.0|^7.0", "symfony/console": "^5.4|^6.0|^7.0", @@ -4140,7 +4125,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.2" + "source": "https://github.com/symfony/translation/tree/v6.4.3" }, "funding": [ { @@ -4156,7 +4141,7 @@ "type": "tidelift" } ], - "time": "2023-12-18T09:25:29+00:00" + "time": "2024-01-29T13:11:52+00:00" }, { "name": "symfony/translation-contracts", @@ -4238,16 +4223,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" + "reference": "0435a08f69125535336177c29d56af3abc1f69da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0435a08f69125535336177c29d56af3abc1f69da", + "reference": "0435a08f69125535336177c29d56af3abc1f69da", "shasum": "" }, "require": { @@ -4303,7 +4288,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.3" }, "funding": [ { @@ -4319,7 +4304,7 @@ "type": "tidelift" } ], - "time": "2023-12-28T19:16:56+00:00" + "time": "2024-01-23T14:53:30+00:00" }, { "name": "vlucas/phpdotenv", @@ -4541,16 +4526,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.3.1", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "551f46f52a93177d873f3be08a1649ae886b4a30" + "reference": "b2830e330011d59a799c0002e118f5b4bbdb9604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/551f46f52a93177d873f3be08a1649ae886b4a30", - "reference": "551f46f52a93177d873f3be08a1649ae886b4a30", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/b2830e330011d59a799c0002e118f5b4bbdb9604", + "reference": "b2830e330011d59a799c0002e118f5b4bbdb9604", "shasum": "" }, "require": { @@ -4558,28 +4543,27 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^0.5.1 || ^1.0.0", + "fidry/cpu-core-counter": "^1.0.0", "jean85/pretty-package-versions": "^2.0.5", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "phpunit/php-code-coverage": "^10.1.7", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-timer": "^6.0", - "phpunit/phpunit": "^10.4.2", - "sebastian/environment": "^6.0.1", - "symfony/console": "^6.3.4 || ^7.0.0", - "symfony/process": "^6.3.4 || ^7.0.0" + "php": "~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.11 || ^11.0.0", + "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0", + "phpunit/php-timer": "^6.0.0 || ^7.0.0", + "phpunit/phpunit": "^10.5.9 || ^11.0.2", + "sebastian/environment": "^6.0.1 || ^7.0.0", + "symfony/console": "^6.4.3 || ^7.0.3", + "symfony/process": "^6.4.3 || ^7.0.3" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "infection/infection": "^0.27.6", - "phpstan/phpstan": "^1.10.40", + "phpstan/phpstan": "^1.10.57", "phpstan/phpstan-deprecation-rules": "^1.1.4", "phpstan/phpstan-phpunit": "^1.3.15", "phpstan/phpstan-strict-rules": "^1.5.2", - "squizlabs/php_codesniffer": "^3.7.2", - "symfony/filesystem": "^6.3.1 || ^7.0.0" + "squizlabs/php_codesniffer": "^3.8.1", + "symfony/filesystem": "^6.4.3 || ^7.0.3" }, "bin": [ "bin/paratest", @@ -4620,7 +4604,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.3.1" + "source": "https://github.com/paratestphp/paratest/tree/v7.4.1" }, "funding": [ { @@ -4632,20 +4616,20 @@ "type": "paypal" } ], - "time": "2023-10-31T09:24:17+00:00" + "time": "2024-02-06T13:50:28+00:00" }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -4677,22 +4661,22 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "fidry/cpu-core-counter", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -4732,7 +4716,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -4740,7 +4724,7 @@ "type": "github" } ], - "time": "2023-09-17T21:38:23+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -4854,16 +4838,16 @@ }, { "name": "laravel/pint", - "version": "v1.13.10", + "version": "v1.13.11", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "e2b5060885694ca30ac008c05dc9d47f10ed1abf" + "reference": "60a163c3e7e3346a1dec96d3e6f02e6465452552" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/e2b5060885694ca30ac008c05dc9d47f10ed1abf", - "reference": "e2b5060885694ca30ac008c05dc9d47f10ed1abf", + "url": "https://api.github.com/repos/laravel/pint/zipball/60a163c3e7e3346a1dec96d3e6f02e6465452552", + "reference": "60a163c3e7e3346a1dec96d3e6f02e6465452552", "shasum": "" }, "require": { @@ -4874,13 +4858,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.47.1", - "illuminate/view": "^10.41.0", + "friendsofphp/php-cs-fixer": "^3.49.0", + "illuminate/view": "^10.43.0", "larastan/larastan": "^2.8.1", "laravel-zero/framework": "^10.3.0", "mockery/mockery": "^1.6.7", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.31.0" + "pestphp/pest": "^2.33.6" }, "bin": [ "builds/pint" @@ -4916,7 +4900,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-01-22T09:04:15+00:00" + "time": "2024-02-13T17:20:13+00:00" }, { "name": "mockery/mockery", @@ -5120,16 +5104,16 @@ }, { "name": "pestphp/pest", - "version": "v2.33.0", + "version": "v2.33.6", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "19e748f0d4a8708d51c0ef55d028d9967f30129f" + "reference": "5b0f88c22716452be59202cfe7c5a24fbb2fb7de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/19e748f0d4a8708d51c0ef55d028d9967f30129f", - "reference": "19e748f0d4a8708d51c0ef55d028d9967f30129f", + "url": "https://api.github.com/repos/pestphp/pest/zipball/5b0f88c22716452be59202cfe7c5a24fbb2fb7de", + "reference": "5b0f88c22716452be59202cfe7c5a24fbb2fb7de", "shasum": "" }, "require": { @@ -5137,19 +5121,19 @@ "nunomaduro/collision": "^7.10.0|^8.1.0", "nunomaduro/termwind": "^1.15.1|^2.0.0", "pestphp/pest-plugin": "^2.1.1", - "pestphp/pest-plugin-arch": "^2.6.1", + "pestphp/pest-plugin-arch": "^2.7.0", "php": "^8.1.0", - "phpunit/phpunit": "^10.5.9" + "phpunit/phpunit": "^10.5.10" }, "conflict": { - "phpunit/phpunit": ">10.5.9", + "phpunit/phpunit": ">10.5.10", "sebastian/exporter": "<5.1.0", "webmozart/assert": "<1.11.0" }, "require-dev": { "pestphp/pest-dev-tools": "^2.16.0", "pestphp/pest-plugin-type-coverage": "^2.8.0", - "symfony/process": "^6.4.0|^7.0.2" + "symfony/process": "^6.4.0|^7.0.3" }, "bin": [ "bin/pest" @@ -5212,7 +5196,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.33.0" + "source": "https://github.com/pestphp/pest/tree/v2.33.6" }, "funding": [ { @@ -5224,7 +5208,7 @@ "type": "github" } ], - "time": "2024-01-26T01:58:03+00:00" + "time": "2024-02-12T08:55:32+00:00" }, { "name": "pestphp/pest-plugin", @@ -6016,16 +6000,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.9", + "version": "10.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe" + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", "shasum": "" }, "require": { @@ -6097,7 +6081,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10" }, "funding": [ { @@ -6113,7 +6097,7 @@ "type": "tidelift" } ], - "time": "2024-01-22T14:35:40+00:00" + "time": "2024-02-04T09:07:51+00:00" }, { "name": "sebastian/cli-parser", @@ -7146,7 +7130,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1" + "php": "^8.1", + "ext-gmp": "*" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/tool/tests/Feature/XorStringTest.php b/tool/tests/Feature/XorStringTest.php new file mode 100644 index 0000000..8a5a986 --- /dev/null +++ b/tool/tests/Feature/XorStringTest.php @@ -0,0 +1,32 @@ +artisan('app:xor-string') + ->expectsQuestion('Enter a string to XOR', $data) + ->expectsQuestion('Enter the key.', $key) + ->assertOk() + ->expectsOutputToContain($expected); + } + + public static function dataProvider(): array + { + return [ + 'welcome' => [ + 'ciphertext' => '5edb5e8029dd2182560da925ec6cd3e1257efc0b8328b4', + 'key' => '6ab768f540ad4ff1226fce429b06aa970b119262ec46be', + 'expected' => '4l6uipnstbggwjyv.onion', + ], + ]; + } +}