diff options
Diffstat (limited to 'include/modules/encryption.h')
-rw-r--r-- | include/modules/encryption.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/include/modules/encryption.h b/include/modules/encryption.h index 50ca066c3..3f4af559d 100644 --- a/include/modules/encryption.h +++ b/include/modules/encryption.h @@ -1,12 +1,20 @@ /* + * Anope IRC Services * - * (C) 2003-2016 Anope Team - * Contact us at team@anope.org + * Copyright (C) 2012-2016 Anope Team <team@anope.org> * - * Please read COPYING and README for further details. + * This file is part of Anope. Anope is free software; you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software + * Foundation, version 2. * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see see <http://www.gnu.org/licenses/>. */ namespace Encryption @@ -18,18 +26,21 @@ namespace Encryption { public: virtual ~Context() { } - virtual void Update(const unsigned char *data, size_t len) = 0; - virtual void Finalize() = 0; - virtual Hash GetFinalizedHash() = 0; + virtual void Update(const unsigned char *data, size_t len) anope_abstract; + virtual void Finalize() anope_abstract; + virtual Hash GetFinalizedHash() anope_abstract; }; class Provider : public Service { public: - Provider(Module *creator, const Anope::string &sname) : Service(creator, "Encryption::Provider", sname) { } + static constexpr const char *NAME = "hash"; + + Provider(Module *creator, const Anope::string &sname) : Service(creator, NAME, sname) { } virtual ~Provider() { } - virtual Context *CreateContext(IV * = NULL) = 0; - virtual IV GetDefaultIV() = 0; + virtual Context *CreateContext(IV * = NULL) anope_abstract; + virtual IV GetDefaultIV() anope_abstract; }; } + |