aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-05 20:58:45 -0700
committerfriendica <info@friendica.com>2012-07-05 20:58:45 -0700
commita6514e81bbd60720dce48798f281244db2ffca2a (patch)
tree00898f73e7f4c5370b85fbc61a26219c0828b575 /include/crypto.php
parent868e04f5eb8510670816aa51f25073150d3747e7 (diff)
downloadvolse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.tar.gz
volse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.tar.bz2
volse-hubzilla-a6514e81bbd60720dce48798f281244db2ffca2a.zip
remove obsolete zot encapsulation functions
Diffstat (limited to 'include/crypto.php')
-rw-r--r--include/crypto.php33
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(