Compare commits
No commits in common. "6ee4389b57e3cd12e76ed793aeacb165709279b4" and "9ad949a760233d4da6efaaa94be48b0afe53440e" have entirely different histories.
6ee4389b57
...
9ad949a760
@ -1,6 +1,8 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned long IntArray[] = {
|
||||
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
|
||||
0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
|
||||
|
@ -2,11 +2,12 @@
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "crypto.h"
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
|
||||
int64 Crypto::RSADecrypt(uchar* text, [[maybe_unused]] int16 size) noexcept
|
||||
int64 Crypto::RSADecrypt(uchar* text, int16 size) noexcept
|
||||
{
|
||||
int64 ret = 0;
|
||||
std::array<uchar, 8> buffer{};
|
||||
@ -49,3 +50,4 @@ void Crypto::setRC4Key(int64 key) noexcept
|
||||
server.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "rc4.h"
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <numeric>
|
||||
|
||||
static constexpr std::array<uchar, 256> get_init_state() noexcept
|
||||
{
|
||||
std::array<uchar, 256> state{};
|
||||
for (std::size_t i = 0; i < 256; ++i) {
|
||||
state[i] = static_cast<uchar>(i);
|
||||
}
|
||||
std::iota(state.begin(), state.end(), 0);
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../types.h"
|
||||
@ -20,3 +19,4 @@ private:
|
||||
uchar m_x{};
|
||||
uchar m_y{};
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "sha512.h"
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
@ -157,7 +158,7 @@ std::string sha512(std::string_view input) noexcept
|
||||
ctx.final(digest.data());
|
||||
|
||||
std::array<char, 2 * SHA512::DIGEST_SIZE + 1> buf{};
|
||||
for (unsigned int i = 0; i < SHA512::DIGEST_SIZE; ++i) {
|
||||
for (int i = 0; i < SHA512::DIGEST_SIZE; ++i) {
|
||||
std::sprintf(buf.data() + i * 2, "%02x", digest[i]);
|
||||
}
|
||||
return std::string{buf.data()};
|
||||
|
@ -1,6 +1,3 @@
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
@ -73,3 +70,5 @@ protected:
|
||||
| ((uint64) *((str) + 1) << 48) \
|
||||
| ((uint64) *((str) + 0) << 56); \
|
||||
}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user