Skip to content

Commit 9d485b5

Browse files
authored
fix: cleanup unused sha1 (opentibiabr#1486)
1 parent dad1f4d commit 9d485b5

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/framework/util/crypt.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,3 @@ std::string Crypt::crc32(const std::string& decoded_string, const bool upperCase
283283
std::ranges::transform(result, result.begin(), tolower);
284284
return result;
285285
}
286-
287-
// NOSONAR - Intentional use of SHA-1 as there is no security impact in this context
288-
std::string Crypt::sha1Encrypt(const std::string& input) {
289-
unsigned char hash[SHA_DIGEST_LENGTH];
290-
SHA1(reinterpret_cast<const unsigned char*>(input.data()), input.size(), hash);
291-
292-
std::ostringstream oss;
293-
for (unsigned char byte : hash)
294-
oss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte);
295-
296-
return oss.str();
297-
}

src/framework/util/crypt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class Crypt
5858
int rsaGetSize();
5959

6060
std::string crc32(const std::string& decoded_string, bool upperCase);
61-
std::string sha1Encrypt(const std::string& input);
6261

6362
private:
6463
std::string _encrypt(const std::string& decrypted_string, bool useMachineUUID);

0 commit comments

Comments
 (0)