diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-10 14:50:56 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-10 15:09:38 +0000 |
commit | 9a8cac060d60aee638e368e96afb46967d6d8190 (patch) | |
tree | 32365ea7ebb3e255907e352fcf867877ab9cd6a9 /include | |
parent | 0353338436141cd27cebd776cbc74e568e801ffe (diff) |
Add support for encrypting passwords with the Argon2 algorithm.
Closes #369.
Diffstat (limited to 'include')
-rw-r--r-- | include/modules/encryption.h | 6 |
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; |