标签:
function
base64url_encode(
$plainText
) {
$base64
=
base64_encode
(
$plainText
);
$base64url
=
strtr
(
$base64
,
‘+/=‘
,
‘-_,‘
);
return
$base64url
;
}
function
base64url_decode(
$plainText
) {
$base64url
=
strtr
(
$plainText
,
‘-_,‘
,
‘+/=‘
);
$base64
=
base64_decode
(
$base64url
);
return
$base64
;
}
标签:
原文地址:http://www.cnblogs.com/DaBing0806/p/4736774.html