< prev index next >
src/share/classes/com/sun/crypto/provider/AESCrypt.java
Print this page
rev 11746 : 8152172: PPC64: Support AES intrinsics
Reviewed-by: ascarpino, simonis
Contributed-by: Hiroshi H Horii <HORII@jp.ibm.com>
@@ -50,11 +50,11 @@
{
private boolean ROUNDS_12 = false;
private boolean ROUNDS_14 = false;
/** Session and Sub keys */
- private Object[] sessionK = null;
+ private int[][] sessionK = null;
private int[] K = null;
/** Cipher encryption/decryption key */
// skip re-generating Session and Sub keys if the cipher key is
// the same
@@ -93,11 +93,11 @@
makeSessionKey(key);
lastKey = key.clone(); // save cipher key
}
// set sub key to the corresponding session Key
- this.K = (int[]) sessionK[(decrypting? 1:0)];
+ this.K = sessionK[(decrypting? 1:0)];
}
/**
* Expand an int[(ROUNDS+1)][4] into int[(ROUNDS+1)*4].
* For decryption round keys, need to rotate right by 4 ints.
@@ -658,11 +658,11 @@
ROUNDS_12 = (ROUNDS>=12);
ROUNDS_14 = (ROUNDS==14);
limit = ROUNDS*4;
// store the expanded sub keys into 'sessionK'
- sessionK = new Object[] { expandedKe, expandedKd };
+ sessionK = new int[][] { expandedKe, expandedKd };
}
/**
* Return The number of rounds for a given Rijndael keysize.
< prev index next >