SHARE
TWEET

Untitled

a guest Aug 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. declare(strict_types=1);
  3.  
  4. /**
  5.  * [base64url_decode decode base64 url encoded data.]
  6.  *
  7.  * @param  string      $data   Data to decode.
  8.  *
  9.  * @param  boolean     $strict Strinct flag.
  10.  *
  11.  * @return string|bool          Decoded String.
  12.  */
  13. function base64url_decode(string $data, bool $strict=false) {
  14.   $b64 = strtr($data, '-_', '+/');
  15.   return base64_decode($b64, $strict);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top