]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_bcrypt.cpp
Add a subclass of IOHookProvider for SSL modules.
[user/henk/code/inspircd.git] / src / modules / m_bcrypt.cpp
index a8de729d2b7704da0d7f1afff83b3b7f5f36638c..9f02dd74c4595d03548a023ae8f11ee340b7b8f4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2017-2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2017-2018, 2020 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2014 Daniel Vassdal <shutter@canternet.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -56,6 +56,11 @@ class BCryptProvider : public HashProvider
                return Generate(data, Salt());
        }
 
+       bool Compare(const std::string& input, const std::string& hash)  CXX11_OVERRIDE
+       {
+               return InspIRCd::TimingSafeCompare(Generate(input, hash), hash);
+       }
+
        std::string ToPrintable(const std::string& raw) CXX11_OVERRIDE
        {
                return raw;