using namespace std;
#include <stdio.h>
+#include "inspircd_config.h"
+#ifdef HAS_STDINT
#include <stdint.h>
+#endif
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
-Server *Srv;
+static Server *Srv;
#define SHA256_DIGEST_SIZE (256 / 8)
#define SHA256_BLOCK_SIZE (512 / 8)
-struct SHA256Context
+#ifndef HAS_STDINT
+typedef unsigned int uint32_t;
+#endif
+
+class SHA256Context : public classbase
{
+ public:
unsigned int tot_len;
unsigned int len;
unsigned char block[2 * SHA256_BLOCK_SIZE];
List[I_OnOperCompare] = 1;
}
- virtual int OnOperCompare(std::string data, std::string input)
+ virtual int OnOperCompare(const std::string &data, const std::string &input)
{
if (data.length() == SHA256_BLOCK_SIZE) // If the data is as long as a hex sha256 hash, try it as that
{