- $signature2 = base64url_encode(Crypto::rsaSign(str_replace('=', '', $data . $precomputed), $owner['sprvkey']));
+ $signature2 = Strings::base64UrlEncode(Crypto::rsaSign(str_replace('=', '', $data . $precomputed), $owner['sprvkey']));
// At first try the non compliant method that works for GNU Social
$xmldata = ["me:env" => ["me:data" => $data,
// At first try the non compliant method that works for GNU Social
$xmldata = ["me:env" => ["me:data" => $data,
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
// check for success, e.g. 2xx
if ($return_code > 299) {
// check for success, e.g. 2xx
if ($return_code > 299) {
// Now try the compliant mode that normally isn't used for GNU Social
$xmldata = ["me:env" => ["me:data" => $data,
// Now try the compliant mode that normally isn't used for GNU Social
$xmldata = ["me:env" => ["me:data" => $data,
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
// Last try. This will most likely fail as well.
$xmldata = ["me:env" => ["me:data" => $data,
// Last try. This will most likely fail as well.
$xmldata = ["me:env" => ["me:data" => $data,
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
*/
public static function salmonKey($pubkey)
{
Crypto::pemToMe($pubkey, $m, $e);
*/
public static function salmonKey($pubkey)
{
Crypto::pemToMe($pubkey, $m, $e);