Update openssl calls to use EVP interface (#5072)
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled

This commit is contained in:
Knightly
2026-04-25 13:49:03 -10:00
committed by GitHub
parent 6694281f22
commit 6d6cc8ca95
3 changed files with 119 additions and 32 deletions
+10
View File
@@ -48,10 +48,20 @@ namespace CryptoHash {
}
std::string GetEncryptionByModeId(uint32 mode);
// DES-CBC with an all-zero key and IV (EQ login protocol obfuscation, not security).
// On encrypt, a trailing partial block is zero-padded to the next 8-byte boundary, so
// buffer_out must be at least ((buffer_in_sz + 7) / 8) * 8 bytes. On decrypt, buffer_in_sz
// must already be a multiple of 8 or the call returns nullptr.
const char *eqcrypt_block(const char *buffer_in, size_t buffer_in_sz, char *buffer_out, bool enc);
std::string eqcrypt_hash(const std::string &username, const std::string &password, int mode);
bool eqcrypt_verify_hash(const std::string &username, const std::string &password, const std::string &pwhash, int mode);
// OpenSSL 3.0 moved DES behind the "legacy" provider; these load/unload it
// for the lifetime of the process. No-op when built against mbedtls.
bool eqcrypt_init();
void eqcrypt_shutdown();
struct EncryptionResult {
std::string password;
int mode = 0;