mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
Updated to PTR build 11655.
This commit is contained in:
parent
e73c5d3b79
commit
768772b14b
12 changed files with 23 additions and 21 deletions
|
|
@ -19,18 +19,18 @@
|
|||
#include "Auth/SARC4.h"
|
||||
#include <openssl/sha.h>
|
||||
|
||||
SARC4::SARC4()
|
||||
SARC4::SARC4(uint8 len)
|
||||
{
|
||||
EVP_CIPHER_CTX_init(&m_ctx);
|
||||
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
||||
EVP_CIPHER_CTX_set_key_length(&m_ctx, SHA_DIGEST_LENGTH);
|
||||
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
|
||||
}
|
||||
|
||||
SARC4::SARC4(uint8 *seed)
|
||||
SARC4::SARC4(uint8 *seed, uint8 len)
|
||||
{
|
||||
EVP_CIPHER_CTX_init(&m_ctx);
|
||||
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
||||
EVP_CIPHER_CTX_set_key_length(&m_ctx, SHA_DIGEST_LENGTH);
|
||||
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
|
||||
EVP_EncryptInit_ex(&m_ctx, NULL, NULL, seed, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue