From 94cd311f8cb6f904e3bf34a2462681c6e3a59883 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 31 Jul 2024 18:39:47 +0000 Subject: [PATCH] Moved Base32 and UriBase64 implementations into the root namespace. --- VERSION | 2 +- src/{Serialisation => }/Base32.php | 2 +- src/Security/CSRFP.php | 8 +++----- src/{Serialisation => }/UriBase64.php | 2 +- tests/Base32Test.php | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) rename src/{Serialisation => }/Base32.php (98%) rename src/{Serialisation => }/UriBase64.php (97%) diff --git a/VERSION b/VERSION index 5fb9ef1..93571de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2407.311834 +0.2407.311838 diff --git a/src/Serialisation/Base32.php b/src/Base32.php similarity index 98% rename from src/Serialisation/Base32.php rename to src/Base32.php index 3170864..5a15de5 100644 --- a/src/Serialisation/Base32.php +++ b/src/Base32.php @@ -3,7 +3,7 @@ // Created: 2022-01-13 // Updated: 2024-07-31 -namespace Index\Serialisation; +namespace Index; /** * Provides Base32 encoding. diff --git a/src/Security/CSRFP.php b/src/Security/CSRFP.php index 3e63253..42f6bf9 100644 --- a/src/Security/CSRFP.php +++ b/src/Security/CSRFP.php @@ -1,11 +1,11 @@ createHash($time, $nonce); - return UriBase64::encode( - pack('V', $time) . $nonce . $hash - ); + return UriBase64::encode(pack('V', $time) . $nonce . $hash); } /** diff --git a/src/Serialisation/UriBase64.php b/src/UriBase64.php similarity index 97% rename from src/Serialisation/UriBase64.php rename to src/UriBase64.php index 8031261..c9645c8 100644 --- a/src/Serialisation/UriBase64.php +++ b/src/UriBase64.php @@ -3,7 +3,7 @@ // Created: 2022-01-13 // Updated: 2024-07-31 -namespace Index\Serialisation; +namespace Index; /** * Provides URL-safe Base64 encoding. diff --git a/tests/Base32Test.php b/tests/Base32Test.php index 8b1e2b7..13eedd5 100644 --- a/tests/Base32Test.php +++ b/tests/Base32Test.php @@ -7,7 +7,7 @@ declare(strict_types=1); use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\CoversClass; -use Index\Serialisation\Base32; +use Index\Base32; #[CoversClass(Base32::class)] final class Base32Test extends TestCase {