Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
AuthCrypt.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef _AUTHCRYPT_H
7#define _AUTHCRYPT_H
8
9#include "ARC4.h"
10#include "AuthDefines.h"
11#include <array>
12
14{
15 public:
16 AuthCrypt();
17
18 void Init(SessionKey const& K);
19 void DecryptRecv(uint8* data, size_t len);
20 void EncryptSend(uint8* data, size_t len);
21
22 bool IsInitialized() const { return _initialized; }
23
24 private:
28};
29#endif
std::array< uint8, SESSION_KEY_LENGTH > SessionKey
Definition AuthDefines.h:8
std::uint8_t uint8
Definition Define.h:79
SkyFire::Crypto::ARC4 _clientDecrypt
Definition AuthCrypt.h:25
void EncryptSend(uint8 *data, size_t len)
Definition AuthCrypt.cpp:36
bool IsInitialized() const
Definition AuthCrypt.h:22
bool _initialized
Definition AuthCrypt.h:27
void Init(SessionKey const &K)
Definition AuthCrypt.cpp:15
SkyFire::Crypto::ARC4 _serverEncrypt
Definition AuthCrypt.h:26
void DecryptRecv(uint8 *data, size_t len)
Definition AuthCrypt.cpp:30