Merge pull request #60457 from madmiraal/replace-index-iterators

Replace index iterators with for each loops.
This commit is contained in:
Rémi Verschelde 2022-04-25 16:02:28 +02:00 committed by GitHub
commit b4a1a76bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -883,9 +883,8 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
// Create Hex String
StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++) {
String s = Integer.toHexString(0xFF & messageDigest[i]);
for (byte b : messageDigest) {
String s = Integer.toHexString(0xFF & b);
if (s.length() == 1) {
s = "0" + s;
}

View File

@ -43,8 +43,8 @@ public class Crypt {
// Create Hex String
StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++)
hexString.append(Integer.toHexString(0xFF & messageDigest[i]));
for (byte b : messageDigest)
hexString.append(Integer.toHexString(0xFF & b));
return hexString.toString();
} catch (Exception e) {