可能的字符的base64网址安全功能 [英] possible characters base64 url safe function
本文介绍了可能的字符的base64网址安全功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是从这个返回的字符串可能的字符范围是多少?
What is the range of possible characters returned from this string?
function base64url_encode($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
我的猜测是 [A-Z0-9 -_]
推荐答案
的可能返回字符的范围是:
The range of possible characters returned are:
-
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U ,V,W,X,Y,Z
-
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U ,v,W,X,Y,Z
-
0,1,2,3,4,5,6,7,8,9
-
-
(减去的)和_
(下划线)
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
-
(minus) and_
(underscore)
在您的正则式,这将是 [A-ZA-Z0-9 _-]
。
In your regex-style, that would be [a-zA-Z0-9_-]
.
这篇关于可能的字符的base64网址安全功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文