From 1621630b064474eb385bfa05d248fec712645814 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 1 Sep 2011 06:29:29 -0700 Subject: login_hook --- include/crypto.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include/crypto.php') diff --git a/include/crypto.php b/include/crypto.php index 88e05b9eb..0feb45c24 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -262,24 +262,27 @@ function aes_unencapsulate($data,$prvkey) { } -function zot_encapsulate($data,$sender,$pubkey) { +// This has been superceded. + +function zot_encapsulate($data,$envelope,$pubkey) { $res = aes_encapsulate($data,$pubkey); -openssl_public_encrypt($sender,$s,$pubkey); -$s1 = base64url_encode($s,true); return <<< EOT - + {$res['key']} {$res['iv']} - $s1 + $s1 + $sig AES-256-CBC {$res['data']} - + EOT; } +// so has this + function zot_unencapsulate($data,$prvkey) { $ret = array(); $c = array(); -- cgit v1.2.3