clean up crypto packages
This commit is contained in:
parent
c97592e485
commit
6ee4389b57
@ -1,8 +1,6 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned long IntArray[] = {
|
||||
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
|
||||
0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
|
||||
|
@ -2,12 +2,11 @@
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "crypto.h"
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
|
||||
int64 Crypto::RSADecrypt(uchar* text, int16 size) noexcept
|
||||
int64 Crypto::RSADecrypt(uchar* text, [[maybe_unused]] int16 size) noexcept
|
||||
{
|
||||
int64 ret = 0;
|
||||
std::array<uchar, 8> buffer{};
|
||||
@ -50,4 +49,3 @@ void Crypto::setRC4Key(int64 key) noexcept
|
||||
server.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../types.h"
|
||||
@ -19,4 +20,3 @@ private:
|
||||
uchar m_x{};
|
||||
uchar m_y{};
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "sha512.h"
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
@ -158,7 +157,7 @@ std::string sha512(std::string_view input) noexcept
|
||||
ctx.final(digest.data());
|
||||
|
||||
std::array<char, 2 * SHA512::DIGEST_SIZE + 1> buf{};
|
||||
for (int i = 0; i < SHA512::DIGEST_SIZE; ++i) {
|
||||
for (unsigned int i = 0; i < SHA512::DIGEST_SIZE; ++i) {
|
||||
std::sprintf(buf.data() + i * 2, "%02x", digest[i]);
|
||||
}
|
||||
return std::string{buf.data()};
|
||||
|
@ -1,3 +1,6 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
@ -70,5 +73,3 @@ protected:
|
||||
| ((uint64) *((str) + 1) << 48) \
|
||||
| ((uint64) *((str) + 0) << 56); \
|
||||
}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user