Removed Base64 proxy.
This commit is contained in:
parent
3952dd96e8
commit
27d28f03ce
2 changed files with 1 additions and 34 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.2407.311805
|
||||
0.2407.311814
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
// Base64.php
|
||||
// Created: 2022-01-13
|
||||
// Updated: 2023-07-21
|
||||
|
||||
namespace Index\Serialisation;
|
||||
|
||||
use Index\IO\Stream;
|
||||
|
||||
/**
|
||||
* Provides a Base64 serialiser.
|
||||
*/
|
||||
final class Base64 {
|
||||
/**
|
||||
* Encodes binary data as a Base64 string.
|
||||
*
|
||||
* @param Stream|string $input Input binary data.
|
||||
* @return string Base64 string representing the binary data.
|
||||
*/
|
||||
public static function encode(Stream|string $input): string {
|
||||
return base64_encode((string)$input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a Base64 string back to binary data.
|
||||
*
|
||||
* @param Stream|string $input Input Base64 string.
|
||||
* @return string|false Binary data.
|
||||
*/
|
||||
public static function decode(Stream|string $input): string|bool {
|
||||
return base64_decode((string)$input);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue