for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ArcherZdip\LaravelApiAuth\Helper;
/**
* Return the Base64-encoded version of $data, The alphabet uses '-' instead of '+' and '_' instead of '/'.
*
* @param $data
* @return mixed
*/
function base64_urlsafe_encode($data)
{
return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($data));
}
* Return the Base64-decoded version of $data, The alphabet uses '-' instead of '+' and '_' instead of '/'.
* @param null $strict
$strict
null
* @return bool|string
function base64_urlsafe_decode($data, $strict = null)
return base64_decode(str_replace(['-', '_'], ['+', '/'], $data), $strict);