summaryrefslogtreecommitdiff
path: root/node/Identity.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Identity.hpp')
-rw-r--r--node/Identity.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/node/Identity.hpp b/node/Identity.hpp
index eb8b19a4..b2a57941 100644
--- a/node/Identity.hpp
+++ b/node/Identity.hpp
@@ -181,6 +181,19 @@ public:
}
/**
+ * Verify a message signature against this identity
+ *
+ * @param data Data to check
+ * @param len Length of data
+ * @param signature Signature
+ * @return True if signature validates and data integrity checks
+ */
+ inline bool verify(const void *data,unsigned int len,const C25519::Signature &signature) const
+ {
+ return C25519::verify(_publicKey,data,len,signature);
+ }
+
+ /**
* Shortcut method to perform key agreement with another identity
*
* This identity must have a private key. (Check hasPrivate())