Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Server/Crypto: Use Cipher Init functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
AriDEV3 committed Jan 7, 2024
1 parent da7a5fe commit 38ef3cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/shared/Cryptography/ARC4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARC4::ARC4() : m_ctx(EVP_CIPHER_CTX_new())
#endif

EVP_CIPHER_CTX_reset(m_ctx);
EVP_EncryptInit_ex(m_ctx, EVP_rc4(), NULL, NULL, NULL);
EVP_CipherInit(m_ctx, EVP_rc4(), NULL, NULL, NULL);
}

ARC4::~ARC4()
Expand All @@ -29,7 +29,7 @@ ARC4::~ARC4()
void ARC4::Init(uint8* seed, uint32 len)
{
EVP_CIPHER_CTX_set_key_length(m_ctx, len);
EVP_EncryptInit_ex(m_ctx, NULL, NULL, seed, NULL);
EVP_CipherInit(m_ctx, NULL, seed, NULL, NULL);
}

void ARC4::UpdateData(int len, uint8 *data)
Expand Down

0 comments on commit 38ef3cf

Please sign in to comment.