Skip to content

Commit

Permalink
fix: SRE issue
Browse files Browse the repository at this point in the history
  • Loading branch information
reeshika-h committed Aug 20, 2024
1 parent 7ac4075 commit 3e71da1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions contentstack/src/main/java/com/contentstack/sdk/SDKUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,9 @@ public String getSHAFromString(String value) {
// Create Hex String
// deepcode ignore ApiMigration: <please specify a reason of ignoring this>
StringBuffer hexString = new StringBuffer();
for (int i = 0; i < messageDigest.length; i++) {
String hex = Integer.toHexString(0xFF & messageDigest[i]);
if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
for (byte b : messageDigest) {
// Format each byte as two-digit hexadecimal
hexString.append(String.format("%02X", b));
}

return hexString.toString();
Expand Down

0 comments on commit 3e71da1

Please sign in to comment.