Moved Base32 and UriBase64 implementations into the root namespace.
This commit is contained in:
parent
b3078c28e3
commit
94cd311f8c
5 changed files with 7 additions and 9 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.2407.311834
|
||||
0.2407.311838
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Created: 2022-01-13
|
||||
// Updated: 2024-07-31
|
||||
|
||||
namespace Index\Serialisation;
|
||||
namespace Index;
|
||||
|
||||
/**
|
||||
* Provides Base32 encoding.
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Created: 2022-01-13
|
||||
// Updated: 2024-07-31
|
||||
|
||||
namespace Index\Serialisation;
|
||||
namespace Index;
|
||||
|
||||
/**
|
||||
* Provides URL-safe Base64 encoding.
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue