Browse Source

[LDRA] 26 S : 루프 컨트롤 식을 종료하지 않을 수 있다. - for문 수정

feature/ldra
leehagjoon(이학준) 1 year ago
parent
commit
fbb4ad0c21
  1. 21
      src/main/java/com/palnet/comn/collection/AuthCollection.java
  2. 16
      src/main/java/com/palnet/server/encrptn/kisa/KISA_SEED_CBC.java

21
src/main/java/com/palnet/comn/collection/AuthCollection.java

@ -9,9 +9,9 @@ import java.util.*;
@Slf4j
public class AuthCollection {
private Logger logger = LoggerFactory.getLogger(getClass());
private final Logger logger = LoggerFactory.getLogger(getClass());
private static Set<String> authkeyList = new HashSet<>();
private static final Set<String> authkeyList = new HashSet<>();
public void reloadAuthkey() {
// 인증키 하드코딩 처리
@ -25,14 +25,25 @@ public class AuthCollection {
public boolean checkAuthkey(String authKey) {
boolean result = false;
for (Iterator<String> iterator = authkeyList.iterator(); iterator.hasNext();) {
Iterator<String> iterator = authkeyList.iterator();
while(iterator.hasNext()){
String item = iterator.next();
if(authKey.equals(item)) {
if(authKey.equals(item)){
result = true;
break;
}
}
// for (Iterator<String> iterator = authkeyList.iterator(); iterator.hasNext();) {
// String item = iterator.next();
//
// if(authKey.equals(item)) {
// result = true;
// }
// }
return result;
}

16
src/main/java/com/palnet/server/encrptn/kisa/KISA_SEED_CBC.java

@ -1190,7 +1190,7 @@ public class KISA_SEED_CBC {
int[] outbuf = new int[process_blockLeng/4];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1275,7 +1275,7 @@ public class KISA_SEED_CBC {
byte []pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1377,7 +1377,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData1, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1466,7 +1466,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1553,7 +1553,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData2, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1641,7 +1641,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1730,7 +1730,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData3, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1819,7 +1819,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);

Loading…
Cancel
Save