diff options
author | Vasudev Kamath <kamathvasudev@gmail.com> | 2012-07-06 22:47:27 +0530 |
---|---|---|
committer | Vasudev Kamath <kamathvasudev@gmail.com> | 2012-07-06 22:47:27 +0530 |
commit | ba4db236ecff1ffdb56adc2715b3f53515f8cb34 (patch) | |
tree | f0b9928aade8aab95d1608890fde1918ce163754 /include/crypto.php | |
parent | 6e4760dd9c512147309b5e4a98d25216610f81da (diff) | |
parent | a122fecf50d06856a2ada8b564f711fb52c327f0 (diff) | |
download | volse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.tar.gz volse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.tar.bz2 volse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.zip |
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'include/crypto.php')
-rw-r--r-- | include/crypto.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/include/crypto.php b/include/crypto.php index 6fc9a287e..ed0a35704 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 -<?xml version='1.0' encoding='UTF-8'?> -<zot:msg xmlns:zot='http://purl.org/zot/1.0'> - <zot:key>{$res['key']}</zot:key> - <zot:iv>{$res['iv']}</zot:iv> - <zot:env>$s1</zot:env> - <zot:sig key_id="$keyid">$sig</zot:sig> - <zot:alg>AES-256-CBC</zot:alg> - <zot:data type='application/magic-envelope+xml'>{$res['data']}</zot:data> -</zot:msg> -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( |