diff options
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index 82bd8c7f1..cb57c2d84 100644 --- a/include/zot.php +++ b/include/zot.php @@ -10,7 +10,7 @@ function zot_new_uid($entity_id) { $rawstr = z_root() . '/' . $entity_id . '.' . mt_rand(); - return(base64url_encode(hash('whirlpool',$rawstr,true),true)); + return(base64url_encode(hash('whirlpool',$rawstr,true),true) . '.' . mt_rand()); } @@ -53,4 +53,14 @@ function zot_sign(&$item,$identity) { function zot_verify(&$item,$identity) { return rsa_verify($item[signed'],base64url_decode($item['signature']),$identity['pubkey']); -}
\ No newline at end of file +} + + + +function zot_notify($entity,$url) { + $x = z_post_url($url, + array('zot_uid' => $entity_global_id, 'callback' => z_root() . '/zot', 'spec' => ZOT_REVISION)); + return($x); +} + + |