don't try to handle OAEP for plugin crypto methods; let them do it if desired

This commit is contained in:
zotlabs 2018-02-20 11:56:51 -08:00
parent ae8623e3af
commit dbeee4707b

View File

@ -163,7 +163,7 @@ function other_encapsulate($data,$pubkey,$alg) {
return $result; return $result;
} }
else { else {
$x = [ 'data' => $data, 'pubkey' => $pubkey, 'alg' => $subalg, 'result' => $data ]; $x = [ 'data' => $data, 'pubkey' => $pubkey, 'alg' => $alg, 'result' => $data ];
call_hooks('other_encapsulate', $x); call_hooks('other_encapsulate', $x);
return $x['result']; return $x['result'];
} }
@ -246,7 +246,7 @@ function other_unencapsulate($data,$prvkey,$alg) {
return $fn(base64url_decode($data['data']),$k,$i); return $fn(base64url_decode($data['data']),$k,$i);
} }
else { else {
$x = [ 'data' => $data, 'prvkey' => $prvkey, 'alg' => $subalg, 'result' => $data ]; $x = [ 'data' => $data, 'prvkey' => $prvkey, 'alg' => $alg, 'result' => $data ];
call_hooks('other_unencapsulate',$x); call_hooks('other_unencapsulate',$x);
return $x['result']; return $x['result'];
} }