mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-02 14:17:26 +02:00
Swap positions of hyphen and underscore characters in URL-safe Base64
This ensures compatibility with RFC 4648 and the example from the appendix of RFC 7515, aside from the padding character that is used.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Delight\Auth;
|
||||
final class Base64 {
|
||||
|
||||
const SPECIAL_CHARS_ORIGINAL = '+/=';
|
||||
const SPECIAL_CHARS_SAFE = '_-~';
|
||||
const SPECIAL_CHARS_SAFE = '-_~';
|
||||
|
||||
public static function encode($data, $safeChars = false) {
|
||||
$result = base64_encode($data);
|
||||
|
Reference in New Issue
Block a user