From 9a8cac060d60aee638e368e96afb46967d6d8190 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 10 Mar 2024 14:50:56 +0000 Subject: Add support for encrypting passwords with the Argon2 algorithm. Closes #369. --- include/modules/encryption.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/modules') 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 CreateContext() = 0; -- cgit