about summary refs log tree commit diff stats
path: root/update/library/trunk/instadisc.php
diff options
context:
space:
mode:
Diffstat (limited to 'update/library/trunk/instadisc.php')
-rw-r--r--update/library/trunk/instadisc.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index e5168b1..8405110 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php
@@ -10,7 +10,7 @@ $idusCentralServer = ''; // Set this to the Central Server you've signed up with
10$idusSubscriptionURI = ''; // Set this to your unique URI 10$idusSubscriptionURI = ''; // Set this to your unique URI
11$idusSubscriptionTitle = ''; // Set this to your Subscription's title 11$idusSubscriptionTitle = ''; // Set this to your Subscription's title
12$idusSubscriptionCategory = ''; // Set this to the category your subscription uses 12$idusSubscriptionCategory = ''; // Set this to the category your subscription uses
13$idusEncryptionPassword = ''; // If creating a password-protected subscription, enter your password here 13$idusActivationKey = ''; // See http://fourisland.com/projects/instadisc/wiki/Update/Library
14 14
15function instaDisc_sendItem($title, $author, $url, $semantics) 15function instaDisc_sendItem($title, $author, $url, $semantics)
16{ 16{
@@ -29,26 +29,4 @@ function instaDisc_sendItem($title, $author, $url, $semantics)
29 $client->send($msg); 29 $client->send($msg);
30} 30}
31 31
32function instaDisc_sendEncrypted($title, $author, $url, $semantics)
33{
34 $cipher = "rijndael-128";
35 $mode = "cbc";
36 $iv = "fedcba9876543210";
37
38 $td = mcrypt_module_open($cipher, "", $mode, $iv);
39 mcrypt_generic_init($td, $idusEncryptionPassword, $iv);
40 $title = bin2hex(mcrypt_generic($td, $title));
41 $author = bin2hex(mcrypt_generic($td, $author));
42 $url = bin2hex(mcrypt_generic($td, $url));
43 foreach ($semantics as $name => $value)
44 {
45 $semantics[$name] = bin2hex(mcrypt_generic($td, $value));
46 }
47
48 mcrypt_generic_deinit($td);
49 mcrypt_module_close($td);
50
51 instaDisc_sendItem($title, $author, $url, $semantics);
52}
53
54?> 32?>