Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/framework/util/crypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,3 @@ std::string Crypt::crc32(const std::string& decoded_string, const bool upperCase
std::ranges::transform(result, result.begin(), tolower);
return result;
}

// NOSONAR - Intentional use of SHA-1 as there is no security impact in this context
std::string Crypt::sha1Encrypt(const std::string& input) {
unsigned char hash[SHA_DIGEST_LENGTH];
SHA1(reinterpret_cast<const unsigned char*>(input.data()), input.size(), hash);

std::ostringstream oss;
for (unsigned char byte : hash)
oss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte);

return oss.str();
}
1 change: 0 additions & 1 deletion src/framework/util/crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class Crypt
int rsaGetSize();

std::string crc32(const std::string& decoded_string, bool upperCase);
std::string sha1Encrypt(const std::string& input);

private:
std::string _encrypt(const std::string& decrypted_string, bool useMachineUUID);
Expand Down
Loading