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(