summaryrefslogtreecommitdiff
path: root/include/modules/encryption.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/encryption.h')
-rw-r--r--include/modules/encryption.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/modules/encryption.h b/include/modules/encryption.h
index 0eec23ec3..71d35044a 100644
--- a/include/modules/encryption.h
+++ b/include/modules/encryption.h
@@ -63,6 +63,12 @@ namespace Encryption
virtual ~Provider() = default;
+ /** Checks whether a plain text value matches a hash created by this provider. */
+ virtual bool Compare(const Anope::string &hash, const Anope::string &plain)
+ {
+ return hash.equals_cs(plain);
+ }
+
/** Creates a new encryption context. */
virtual std::unique_ptr<Context> CreateContext() = 0;