diff options
author | friendica <info@friendica.com> | 2012-07-05 20:58:45 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-05 20:58:45 -0700 |
commit | a6514e81bbd60720dce48798f281244db2ffca2a (patch) | |
tree | 00898f73e7f4c5370b85fbc61a26219c0828b575 /include | |
parent | 868e04f5eb8510670816aa51f25073150d3747e7 (diff) | |
download | volse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.tar.gz volse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.tar.bz2 volse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.zip |
remove obsolete zot encapsulation functions
Diffstat (limited to 'include')
-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( |