From: friendica Date: Fri, 6 Jul 2012 03:58:45 +0000 (-0700) Subject: remove obsolete zot encapsulation functions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6514e81bbd60720dce48798f281244db2ffca2a;p=friendica.git remove obsolete zot encapsulation functions --- diff --git a/include/crypto.php b/include/crypto.php index 6fc9a287e4..ed0a35704e 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -261,39 +261,6 @@ function aes_unencapsulate($data,$prvkey) { return AES256CBC_decrypt(base64url_decode($data['data']),$k,$i); } - -// This has been superceded. - -function zot_encapsulate($data,$envelope,$pubkey) { -$res = aes_encapsulate($data,$pubkey); - -return <<< EOT - - - {$res['key']} - {$res['iv']} - $s1 - $sig - AES-256-CBC - {$res['data']} - -EOT; - -} - -// so has this - -function zot_unencapsulate($data,$prvkey) { - $ret = array(); - $c = array(); - $x = parse_xml_string($data); - $c = array('key' => $x->key,'iv' => $x->iv,'data' => $x->data); - openssl_private_decrypt(base64url_decode($x->sender),$s,$prvkey); - $ret['sender'] = $s; - $ret['data'] = aes_unencapsulate($x,$prvkey); - return $ret; -} - function new_keypair($bits) { $openssl_options = array(