style: include SPP_TOSTRING_ON_STRING (#5183)

This commit is contained in:
Piotr Idzik 2024-05-27 23:07:20 +02:00 committed by GitHub
parent 295e7436b1
commit 70c1d97ab1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -261,9 +261,6 @@
<Match> <Match>
<Bug pattern="SLS_SUSPICIOUS_LOOP_SEARCH" /> <Bug pattern="SLS_SUSPICIOUS_LOOP_SEARCH" />
</Match> </Match>
<Match>
<Bug pattern="SPP_TOSTRING_ON_STRING" />
</Match>
<!-- find-sec-bugs --> <!-- find-sec-bugs -->
<Match> <Match>
<Bug pattern="PREDICTABLE_RANDOM" /> <Bug pattern="PREDICTABLE_RANDOM" />

View File

@ -238,7 +238,7 @@ public class DES {
} }
for (i = 0; i < l; i += 64) { for (i = 0; i < l; i += 64) {
String block = message.substring(i, i + 64); String block = message.substring(i, i + 64);
String result = decryptBlock(block.toString(), subKeys); String result = decryptBlock(block, subKeys);
byte[] res = new byte[8]; byte[] res = new byte[8];
for (j = 0; j < 64; j += 8) { for (j = 0; j < 64; j += 8) {
res[j / 8] = (byte) Integer.parseInt(result.substring(j, j + 8), 2); res[j / 8] = (byte) Integer.parseInt(result.substring(j, j + 8), 2);