You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/09/02 19:48:56 UTC
svn commit: r1380013 -
/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
Author: ggregory
Date: Sun Sep 2 17:48:55 2012
New Revision: 1380013
URL: http://svn.apache.org/viewvc?rev=1380013&view=rev
Log:
Checkstyle: binary op should be on the previous line.
Modified:
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java?rev=1380013&r1=1380012&r2=1380013&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/digest/UnixCrypt.java Sun Sep 2 17:48:55 2012
@@ -199,8 +199,8 @@ public class UnixCrypt {
if (salt == null) {
Random randomGenerator = new Random();
int numSaltChars = SALT_CHARS.length;
- salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)]
- + SALT_CHARS[randomGenerator.nextInt(numSaltChars)];
+ salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)] +
+ SALT_CHARS[randomGenerator.nextInt(numSaltChars)];
} else if (!salt.matches("^[" + B64.B64T + "]{2,}$")) {
throw new IllegalArgumentException("Invalid salt value: " + salt);
}
@@ -329,9 +329,9 @@ public class UnixCrypt {
u = u ^ u << 16 ^ r ^ sArr[s];
int t = v ^ v << 16 ^ r ^ sArr[s + 1];
t = t >>> 4 | t << 28;
- el ^= SPTRANS[1][t & 0x3f] | SPTRANS[3][t >>> 8 & 0x3f] | SPTRANS[5][t >>> 16 & 0x3f]
- | SPTRANS[7][t >>> 24 & 0x3f] | SPTRANS[0][u & 0x3f] | SPTRANS[2][u >>> 8 & 0x3f]
- | SPTRANS[4][u >>> 16 & 0x3f] | SPTRANS[6][u >>> 24 & 0x3f];
+ el ^= SPTRANS[1][t & 0x3f] | SPTRANS[3][t >>> 8 & 0x3f] | SPTRANS[5][t >>> 16 & 0x3f] |
+ SPTRANS[7][t >>> 24 & 0x3f] | SPTRANS[0][u & 0x3f] | SPTRANS[2][u >>> 8 & 0x3f] |
+ SPTRANS[4][u >>> 16 & 0x3f] | SPTRANS[6][u >>> 24 & 0x3f];
return el;
}
@@ -367,11 +367,11 @@ public class UnixCrypt {
}
c &= 0xfffffff;
d &= 0xfffffff;
- int s = SKB[0][c & 0x3f] | SKB[1][c >>> 6 & 0x3 | c >>> 7 & 0x3c]
- | SKB[2][c >>> 13 & 0xf | c >>> 14 & 0x30]
- | SKB[3][c >>> 20 & 0x1 | c >>> 21 & 0x6 | c >>> 22 & 0x38];
- int t = SKB[4][d & 0x3f] | SKB[5][d >>> 7 & 0x3 | d >>> 8 & 0x3c] | SKB[6][d >>> 15 & 0x3f]
- | SKB[7][d >>> 21 & 0xf | d >>> 22 & 0x30];
+ int s = SKB[0][c & 0x3f] | SKB[1][c >>> 6 & 0x3 | c >>> 7 & 0x3c] |
+ SKB[2][c >>> 13 & 0xf | c >>> 14 & 0x30] |
+ SKB[3][c >>> 20 & 0x1 | c >>> 21 & 0x6 | c >>> 22 & 0x38];
+ int t = SKB[4][d & 0x3f] | SKB[5][d >>> 7 & 0x3 | d >>> 8 & 0x3c] | SKB[6][d >>> 15 & 0x3f] |
+ SKB[7][d >>> 21 & 0xf | d >>> 22 & 0x30];
schedule[j++] = (t << 16 | s & 0xffff);
s = s >>> 16 | t & 0xffff0000;
s = s << 4 | s >>> 28;