Using TC structure allowing easier patches importing

This commit is contained in:
Yehonal
2017-12-20 20:48:35 +01:00
parent 0fc4a6a153
commit 17332304fd
1197 changed files with 0 additions and 69 deletions
+38
View File
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef _AUTH_SHA1_H
#define _AUTH_SHA1_H
#include "Define.h"
#include <string>
#include <openssl/sha.h>
class BigNumber;
class SHA1Hash
{
public:
SHA1Hash();
~SHA1Hash();
void UpdateBigNumbers(BigNumber* bn0, ...);
void UpdateData(const uint8 *dta, int len);
void UpdateData(const std::string &str);
void Initialize();
void Finalize();
uint8 *GetDigest(void) { return mDigest; };
int GetLength(void) const { return SHA_DIGEST_LENGTH; };
private:
SHA_CTX mC;
uint8 mDigest[SHA_DIGEST_LENGTH];
};
#endif