fix ElGamalTest compile; fix jbigi.jar path to speed up the test

This commit is contained in:
zzz
2011-06-02 20:29:15 +00:00
parent b37a64905b
commit 219d7fd8c3
3 changed files with 9 additions and 4 deletions

View File

@@ -99,7 +99,7 @@
<pathelement path="${classpath}" />
<pathelement location="./build/obj_test" />
<pathelement location="./build/obj" />
<pathelement location="../../installer/lib/jbigi/jbigi.jar" />
<pathelement location="../../build/jbigi.jar" />
<pathelement location="${with.cobertura}" />
</classpath>
<batchtest todir="../../reports/core/junit/">

View File

@@ -295,7 +295,10 @@ public class ElGamalAESEngine {
return decryptAESBlock(encrypted, 0, encrypted.length, key, iv, sentTag, foundTags, foundKey);
}
private byte[] decryptAESBlock(byte encrypted[], int offset, int encryptedLen, SessionKey key, byte iv[],
/*
* Note: package private for ElGamalTest.testAES()
*/
byte[] decryptAESBlock(byte encrypted[], int offset, int encryptedLen, SessionKey key, byte iv[],
byte sentTag[], Set foundTags, SessionKey foundKey) throws DataFormatException {
//_log.debug("iv for decryption: " + DataHelper.toString(iv, 16));
//_log.debug("decrypting AES block. encr.length = " + (encrypted == null? -1 : encrypted.length) + " sentTag: " + DataHelper.toString(sentTag, 32));
@@ -543,8 +546,9 @@ public class ElGamalAESEngine {
* - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0
* </pre>
*
* Note: package private for ElGamalTest.testAES()
*/
private final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
long paddedSize) {
return encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize, 0);
}