mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-03 14:47:30 +02:00
Switch characters in URL-safe Base64 to use tilde (~) for padding
The tilde character is less familiar to most users and harder to type on most keyboards (compared to the hyphen and underscore characters).
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Delight\Auth;
|
|||||||
final class Base64 {
|
final class Base64 {
|
||||||
|
|
||||||
const SPECIAL_CHARS_ORIGINAL = '+/=';
|
const SPECIAL_CHARS_ORIGINAL = '+/=';
|
||||||
const SPECIAL_CHARS_SAFE = '~_-';
|
const SPECIAL_CHARS_SAFE = '_-~';
|
||||||
|
|
||||||
public static function encode($data, $safeChars = false) {
|
public static function encode($data, $safeChars = false) {
|
||||||
$result = base64_encode($data);
|
$result = base64_encode($data);
|
||||||
|
Reference in New Issue
Block a user