Skip to content

Commit

Permalink
Merge pull request #67 from contentstack/fix/DX-1206-SRE-issue
Browse files Browse the repository at this point in the history
DX-1206 | fix: SRE issue
  • Loading branch information
reeshika-h authored Aug 20, 2024
2 parents 280d40f + 3e71da1 commit 13ae038
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 13ae038

Please sign in to comment.