Guest User

Untitled

a guest
Nov 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. <?php
  2.  
  3. function base64url_encode($data)
  4. {
  5. return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
  6. }
  7.  
  8. function base64url_decode($b64url)
  9. {
  10. return base64_decode(strtr($b64url, '-_', '+/'));
  11. }
Add Comment
Please, Sign In to add comment