diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-02-01 18:46:31 +0100 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-02-01 18:46:31 +0100 |
commit | 9065270694aebeb1bbf4ad10622d0604eac2e0b5 (patch) | |
tree | 30314c4d46e6910fe2848153eb9c9cd6467620f5 /include/salmon.php | |
parent | 58e0129433559e41c93ac823229f53e46bdb7983 (diff) | |
parent | 8acc76a3c6fa3fe5401811fcd90a20a69388a850 (diff) | |
download | volse-hubzilla-9065270694aebeb1bbf4ad10622d0604eac2e0b5.tar.gz volse-hubzilla-9065270694aebeb1bbf4ad10622d0604eac2e0b5.tar.bz2 volse-hubzilla-9065270694aebeb1bbf4ad10622d0604eac2e0b5.zip |
Merge branch 'friendika-master'
Diffstat (limited to 'include/salmon.php')
-rw-r--r-- | include/salmon.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/salmon.php b/include/salmon.php index 49384efea..8a56882ad 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -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; } |