Moved Base32 and UriBase64 implementations into the root namespace.

This commit is contained in:
Pachira 2024-07-31 18:39:47 +00:00
parent b3078c28e3
commit 94cd311f8c
5 changed files with 7 additions and 9 deletions

View file

@ -1 +1 @@
0.2407.311834
0.2407.311838

View file

@ -3,7 +3,7 @@
// Created: 2022-01-13
// Updated: 2024-07-31
namespace Index\Serialisation;
namespace Index;
/**
* Provides Base32 encoding.

View file

@ -1,11 +1,11 @@
<?php
// CSRFP.php
// Created: 2021-06-11
// Updated: 2023-07-21
// Updated: 2024-07-31
namespace Index\Security;
use Index\Serialisation\UriBase64;
use Index\UriBase64;
/**
* Contains a mechanism for validating requests.
@ -60,9 +60,7 @@ class CSRFP {
$nonce = random_bytes(self::NONCE_LENGTH);
$hash = $this->createHash($time, $nonce);
return UriBase64::encode(
pack('V', $time) . $nonce . $hash
);
return UriBase64::encode(pack('V', $time) . $nonce . $hash);
}
/**

View file

@ -3,7 +3,7 @@
// Created: 2022-01-13
// Updated: 2024-07-31
namespace Index\Serialisation;
namespace Index;
/**
* Provides URL-safe Base64 encoding.

View file

@ -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 {