Change length type of BytesToHexString
This commit is contained in:
@@ -74,7 +74,7 @@ void InitializeOldNames();
|
||||
std::string GenerateUid(std::string_view subject)
|
||||
{
|
||||
extern void NetworkRandomBytesWithFallback(void *buf, size_t n);
|
||||
extern std::string BytesToHexString(const byte *data, uint length);
|
||||
extern std::string BytesToHexString(const byte *data, size_t length);
|
||||
|
||||
uint8 random_bytes[32];
|
||||
NetworkRandomBytesWithFallback(random_bytes, lengthof(random_bytes));
|
||||
|
@@ -1299,7 +1299,7 @@ static void NetworkGenerateServerId()
|
||||
_settings_client.network.network_id = GenerateUid("OpenTTD Server ID");
|
||||
}
|
||||
|
||||
std::string BytesToHexString(const byte *data, uint length)
|
||||
std::string BytesToHexString(const byte *data, size_t length)
|
||||
{
|
||||
std::string hex_output;
|
||||
hex_output.resize(length * 2);
|
||||
|
@@ -162,7 +162,7 @@ StringID GetNetworkErrorMsg(NetworkErrorCode err);
|
||||
bool NetworkMakeClientNameUnique(std::string &new_name);
|
||||
std::string GenerateCompanyPasswordHash(const std::string &password, const std::string &password_server_id, uint32 password_game_seed);
|
||||
std::vector<uint8> GenerateGeneralPasswordHash(const std::string &password, const std::string &password_server_id, uint64 password_game_seed);
|
||||
std::string BytesToHexString(const byte *data, uint length);
|
||||
std::string BytesToHexString(const byte *data, size_t length);
|
||||
std::string NetworkGenerateRandomKeyString(uint bytes);
|
||||
|
||||
std::string_view ParseCompanyFromConnectionString(const std::string &connection_string, CompanyID *company_id);
|
||||
|
Reference in New Issue
Block a user