1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 10:06:38 +02:00

Move encryption.h to include/modules

This commit is contained in:
Adam
2014-02-17 13:53:04 -05:00
parent 7074944810
commit baff417652
6 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
*/
#include "module.h"
#include "encryption.h"
#include "modules/encryption.h"
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
+1 -1
View File
@@ -10,7 +10,7 @@
*/
#include "module.h"
#include "encryption.h"
#include "modules/encryption.h"
static ServiceReference<Encryption::Provider> md5("Encryption::Provider", "md5");
+1 -1
View File
@@ -15,7 +15,7 @@ A million repetitions of "a"
/* #define LITTLE_ENDIAN * This should be #define'd if true. */
#include "module.h"
#include "encryption.h"
#include "modules/encryption.h"
union CHAR64LONG16
{
+1 -1
View File
@@ -48,7 +48,7 @@
*/
#include "module.h"
#include "encryption.h"
#include "modules/encryption.h"
static const unsigned SHA256_DIGEST_SIZE = 256 / 8;
static const unsigned SHA256_BLOCK_SIZE = 512 / 8;
-37
View File
@@ -1,37 +0,0 @@
/*
*
* (C) 2003-2014 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
namespace Encryption
{
typedef std::pair<const unsigned char *, size_t> Hash;
typedef std::pair<const uint32_t *, size_t> IV;
class Context
{
public:
virtual ~Context() { }
virtual void Update(const unsigned char *data, size_t len) = 0;
virtual void Finalize() = 0;
virtual Hash GetFinalizedHash() = 0;
};
class Provider : public Service
{
public:
Provider(Module *creator, const Anope::string &sname) : Service(creator, "Encryption::Provider", sname) { }
virtual ~Provider() { }
virtual Context *CreateContext(IV * = NULL) = 0;
virtual IV GetDefaultIV() = 0;
};
}