X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcrypto.php;h=0feb45c2474b58edbb0f27e066d7c382eaf2e992;hb=64d0616762efcff413a335f2fdde4d8219d44895;hp=88e05b9eb0e34a75a2a2eff9beadfe866cf8c364;hpb=030dcbd467d5faf01e6f62b9cd9b1be6f8974dcc;p=friendica.git diff --git a/include/crypto.php b/include/crypto.php old mode 100644 new mode 100755 index 88e05b9eb0..0feb45c247 --- a/include/crypto.php +++ b/include/crypto.php @@ -262,24 +262,27 @@ function aes_unencapsulate($data,$prvkey) { } -function zot_encapsulate($data,$sender,$pubkey) { +// This has been superceded. + +function zot_encapsulate($data,$envelope,$pubkey) { $res = aes_encapsulate($data,$pubkey); -openssl_public_encrypt($sender,$s,$pubkey); -$s1 = base64url_encode($s,true); return <<< EOT - + {$res['key']} {$res['iv']} - $s1 + $s1 + $sig AES-256-CBC {$res['data']} - + EOT; } +// so has this + function zot_unencapsulate($data,$prvkey) { $ret = array(); $c = array();