From 4824e5b8b8d57ba9af8a5a26f78a5dc90eb714d1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Jul 2012 18:29:27 -0700 Subject: birthdays and events are now notifications --- include/zot.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index f49af08ad..82bd8c7f1 100644 --- a/include/zot.php +++ b/include/zot.php @@ -47,4 +47,10 @@ function zot_get_hubloc($arr,$primary) { function zot_sign(&$item,$identity) { $item['signed'] = str_replace(array(" ","\t","\n","\r"),array('','','',''),base64url_encode($item['body'],true)); $item['signature'] = base64url_encode(rsa_sign($item['signed'],$identity['prvkey'])); +} + +// Given an item and an identity, verify the signature. + +function zot_verify(&$item,$identity) { + return rsa_verify($item[signed'],base64url_decode($item['signature']),$identity['pubkey']); } \ No newline at end of file -- cgit v1.2.3