EverWrath/src/common/Cryptography/Authentication/AuthCrypt.h

30 lines
698 B
C++

/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef _AUTHCRYPT_H
#define _AUTHCRYPT_H
#include "Cryptography/ARC4.h"
class BigNumber;
class AuthCrypt
{
public:
AuthCrypt();
void Init(BigNumber* K);
void DecryptRecv(uint8*, size_t);
void EncryptSend(uint8*, size_t);
bool IsInitialized() const { return _initialized; }
private:
ARC4 _clientDecrypt;
ARC4 _serverEncrypt;
bool _initialized;
};
#endif