about summary refs log tree commit diff stats
path: root/update/library/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'update/library/trunk')
-rw-r--r--update/library/trunk/instadisc.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index 6cf5e09..bfc1101 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php
@@ -35,7 +35,7 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics)
35 35
36function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics) 36function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics)
37{ 37{
38 global $idusEncryptionKey; 38 global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI, $idusEncryptionKey;
39 39
40 $encID = 0; 40 $encID = 0;
41 while ($encID == 0) 41 while ($encID == 0)
@@ -48,17 +48,26 @@ function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics)
48 $key = substr(md5(substr(str_pad($idusEncryptionKey[$id],16,$encID),0,16)),0,16); 48 $key = substr(md5(substr(str_pad($idusEncryptionKey[$id],16,$encID),0,16)),0,16);
49 49
50 $td = mcrypt_module_open($cipher, "", $mode, ""); 50 $td = mcrypt_module_open($cipher, "", $mode, "");
51
51 mcrypt_generic_init($td, $key, strrev($key)); 52 mcrypt_generic_init($td, $key, strrev($key));
52 $title = bin2hex(mcrypt_generic($td, $title)); 53 $title = bin2hex(mcrypt_generic($td, $title));
54 mcrypt_generic_deinit($td);
55
56 mcrypt_generic_init($td, $key, strrev($key));
53 $author = bin2hex(mcrypt_generic($td, $author)); 57 $author = bin2hex(mcrypt_generic($td, $author));
58 mcrypt_generic_deinit($td);
59
60 mcrypt_generic_init($td, $key, strrev($key));
54 $url = bin2hex(mcrypt_generic($td, $url)); 61 $url = bin2hex(mcrypt_generic($td, $url));
62 mcrypt_generic_deinit($td);
55 63
56 foreach ($semantics as $name => $value) 64 foreach ($semantics as $name => $value)
57 { 65 {
66 mcrypt_generic_init($td, $key, strrev($key));
58 $semantics[$name] = bin2hex(mcrypt_generic($td, $value)); 67 $semantics[$name] = bin2hex(mcrypt_generic($td, $value));
68 mcrypt_generic_deinit($td);
59 } 69 }
60 70
61 mcrypt_generic_deinit($td);
62 mcrypt_module_close($td); 71 mcrypt_module_close($td);
63 72
64 $verID = rand(1,65536); 73 $verID = rand(1,65536);