provide ability to survive transport mangling when travelling through html networks

This commit is contained in:
Friendika 2011-02-01 05:10:04 -08:00
commit 8acc76a3c6
2 changed files with 36 additions and 18 deletions

View file

@ -18,15 +18,13 @@ function salmon_key($pubkey) {
}
function base64url_encode($s) {
function base64url_encode($s, $strip_padding = false) {
$s = strtr(base64_encode($s),'+/','-_');
/*
* // placeholder for un-padded base64url_encode
* // per latest salmon rev
*
* $s = str_replace('=','',$s);
*
*/
if($strip_padding)
$s = str_replace('=','',$s);
return $s;
}