Skip to content

Commit 2dfd039

Browse files
committed
Checkstyle: binary op should be on the previous line.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1380013 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9b5a2e0 commit 2dfd039

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/main/java/org/apache/commons/codec/digest/UnixCrypt.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public static String crypt(byte[] original, String salt) {
199199
if (salt == null) {
200200
Random randomGenerator = new Random();
201201
int numSaltChars = SALT_CHARS.length;
202-
salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)]
203-
+ SALT_CHARS[randomGenerator.nextInt(numSaltChars)];
202+
salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)] +
203+
SALT_CHARS[randomGenerator.nextInt(numSaltChars)];
204204
} else if (!salt.matches("^[" + B64.B64T + "]{2,}$")) {
205205
throw new IllegalArgumentException("Invalid salt value: " + salt);
206206
}
@@ -329,9 +329,9 @@ private static int dEncrypt(int el, int r, int s, int e0, int e1, int sArr[]) {
329329
u = u ^ u << 16 ^ r ^ sArr[s];
330330
int t = v ^ v << 16 ^ r ^ sArr[s + 1];
331331
t = t >>> 4 | t << 28;
332-
el ^= SPTRANS[1][t & 0x3f] | SPTRANS[3][t >>> 8 & 0x3f] | SPTRANS[5][t >>> 16 & 0x3f]
333-
| SPTRANS[7][t >>> 24 & 0x3f] | SPTRANS[0][u & 0x3f] | SPTRANS[2][u >>> 8 & 0x3f]
334-
| SPTRANS[4][u >>> 16 & 0x3f] | SPTRANS[6][u >>> 24 & 0x3f];
332+
el ^= SPTRANS[1][t & 0x3f] | SPTRANS[3][t >>> 8 & 0x3f] | SPTRANS[5][t >>> 16 & 0x3f] |
333+
SPTRANS[7][t >>> 24 & 0x3f] | SPTRANS[0][u & 0x3f] | SPTRANS[2][u >>> 8 & 0x3f] |
334+
SPTRANS[4][u >>> 16 & 0x3f] | SPTRANS[6][u >>> 24 & 0x3f];
335335
return el;
336336
}
337337

@@ -367,11 +367,11 @@ private static int[] desSetKey(byte key[]) {
367367
}
368368
c &= 0xfffffff;
369369
d &= 0xfffffff;
370-
int s = SKB[0][c & 0x3f] | SKB[1][c >>> 6 & 0x3 | c >>> 7 & 0x3c]
371-
| SKB[2][c >>> 13 & 0xf | c >>> 14 & 0x30]
372-
| SKB[3][c >>> 20 & 0x1 | c >>> 21 & 0x6 | c >>> 22 & 0x38];
373-
int t = SKB[4][d & 0x3f] | SKB[5][d >>> 7 & 0x3 | d >>> 8 & 0x3c] | SKB[6][d >>> 15 & 0x3f]
374-
| SKB[7][d >>> 21 & 0xf | d >>> 22 & 0x30];
370+
int s = SKB[0][c & 0x3f] | SKB[1][c >>> 6 & 0x3 | c >>> 7 & 0x3c] |
371+
SKB[2][c >>> 13 & 0xf | c >>> 14 & 0x30] |
372+
SKB[3][c >>> 20 & 0x1 | c >>> 21 & 0x6 | c >>> 22 & 0x38];
373+
int t = SKB[4][d & 0x3f] | SKB[5][d >>> 7 & 0x3 | d >>> 8 & 0x3c] | SKB[6][d >>> 15 & 0x3f] |
374+
SKB[7][d >>> 21 & 0xf | d >>> 22 & 0x30];
375375
schedule[j++] = (t << 16 | s & 0xffff);
376376
s = s >>> 16 | t & 0xffff0000;
377377
s = s << 4 | s >>> 28;

0 commit comments

Comments
 (0)