From 01a52b76bcf1fd656e1afb89d24fe99d45edec5f Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 23 Jul 2017 22:56:28 +0200 Subject: [PATCH] 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). --- src/Base64.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base64.php b/src/Base64.php index 1ab4dde..7abce3d 100644 --- a/src/Base64.php +++ b/src/Base64.php @@ -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);