summaryrefslogtreecommitdiffstats
path: root/crypto/src
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
commitb7926325a1c1a370c84c81db80372f59af240a53 (patch)
treeb1d0214be443ea674d0ded8c502a8e074e50bdd2 /crypto/src
parent687f18b91f4a0a728a027579110953ee729adcb8 (diff)
downloadlibcore-b7926325a1c1a370c84c81db80372f59af240a53.zip
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.gz
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/BadPaddingExceptionTest.java12
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherSpiTest.java37
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java5
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismExceptionTest.java12
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismSpiTest.java9
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/IllegalBlockSizeExceptionTest.java12
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementSpiTest.java43
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementTest.java2
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyGeneratorSpiTest.java67
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacSpiTest.java9
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/NoSuchPaddingExceptionTest.java12
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactorySpiTest.java31
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyTest.java9
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ShortBufferExceptionTest.java12
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesTest.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesWrapTest.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeTest.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeWrapTest.java14
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDesTest.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherPBETest.java5
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherRSATest.java1
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyAgreementFunctionalTest.java31
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyGeneratorFunctionalTest.java5
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/MacFunctionalTest.java50
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/SecretKeyFactoryFunctionalTest.java39
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPrivateKeyTest.java24
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPublicKeyTest.java9
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/PBEKeyTest.java9
-rw-r--r--crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java2
30 files changed, 167 insertions, 299 deletions
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/BadPaddingExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/BadPaddingExceptionTest.java
index 4dcc314..6297392 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/BadPaddingExceptionTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/BadPaddingExceptionTest.java
@@ -39,18 +39,6 @@ import junit.framework.TestCase;
@TestTargetClass(BadPaddingException.class)
public class BadPaddingExceptionTest extends TestCase {
- public static void main(String[] args) {
- }
-
- /**
- * Constructor for BadPaddingExceptionTests.
- *
- * @param arg0
- */
- public BadPaddingExceptionTest(String arg0) {
- super(arg0);
- }
-
static String[] msgs = {
"",
"Check new message",
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherSpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherSpiTest.java
index 72d7c81..56e83c6 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherSpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherSpiTest.java
@@ -53,12 +53,15 @@ public class CipherSpiTest extends TestCase {
class Mock_CipherSpi extends myCipherSpi {
@Override
- protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException {
- return super.engineDoFinal(input, inputOffset, inputLen);
+ protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
+ throws IllegalBlockSizeException, BadPaddingException {
+ return super.engineDoFinal(input, inputOffset, inputLen);
}
@Override
- protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException {
+ protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output,
+ int outputOffset) throws ShortBufferException, IllegalBlockSizeException,
+ BadPaddingException {
return super.engineDoFinal(input, inputOffset, inputLen, output, outputOffset);
}
@@ -83,17 +86,20 @@ public class CipherSpiTest extends TestCase {
}
@Override
- protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException {
+ protected void engineInit(int opmode, Key key, SecureRandom random)
+ throws InvalidKeyException {
super.engineInit(opmode, key, random);
}
@Override
- protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
+ protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params,
+ SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
super.engineInit(opmode, key, params, random);
}
@Override
- protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
+ protected void engineInit(int opmode, Key key, AlgorithmParameters params,
+ SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
super.engineInit(opmode, key, params, random);
}
@@ -113,7 +119,8 @@ public class CipherSpiTest extends TestCase {
}
@Override
- protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException {
+ protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output,
+ int outputOffset) throws ShortBufferException {
return super.engineUpdate(input, inputOffset, inputLen, output, outputOffset);
}
@@ -121,28 +128,20 @@ public class CipherSpiTest extends TestCase {
protected int engineGetKeySize(Key key) throws InvalidKeyException {
return super.engineGetKeySize(key);
}
-
+
@Override
protected byte[] engineWrap(Key key) throws InvalidKeyException, IllegalBlockSizeException {
return super.engineWrap(key);
}
-
+
@Override
- protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException {
+ protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
+ throws InvalidKeyException, NoSuchAlgorithmException {
return super.engineUnwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType);
}
}
/**
- * Constructor for CipherSpiTests.
- *
- * @param arg0
- */
- public CipherSpiTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>CipherSpi</code> constructor
* Assertion: constructs CipherSpi
*/
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java
index f06fa54..1245eb3 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/CipherTest.java
@@ -17,7 +17,6 @@
package org.apache.harmony.crypto.tests.javax.crypto;
-import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargetNew;
@@ -787,7 +786,6 @@ public class CipherTest extends junit.framework.TestCase {
args = {byte[].class, int.class, int.class, byte[].class, int.class}
)
})
- @KnownFailure("Fixed in ToT")
public void testDoFinalbyteArrayintintbyteArrayint() throws Exception {
byte[] b = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
byte[] b1 = new byte[30];
@@ -1190,7 +1188,6 @@ public class CipherTest extends junit.framework.TestCase {
args = {byte[].class, java.lang.String.class, int.class}
)
})
- @KnownFailure("Fixed in ToT")
public void test_unwrap$BLjava_lang_StringI () throws NoSuchAlgorithmException,
NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException,
IllegalBlockSizeException {
@@ -1408,7 +1405,6 @@ public class CipherTest extends junit.framework.TestCase {
method = "doFinal",
args = {byte[].class, int.class}
)
- @KnownFailure("Fixed in ToT")
public void test_doFinal$BI() throws Exception {
byte[] b = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
byte[] b1 = new byte[30];
@@ -1580,7 +1576,6 @@ public class CipherTest extends junit.framework.TestCase {
method = "doFinal",
args = {byte[].class, int.class, int.class, byte[].class}
)
- @KnownFailure("Fixed in ToT")
public void test_doFinal$BII$B() throws Exception {
byte[] b = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
byte[] b1 = new byte[30];
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismExceptionTest.java
index 99901ac..a26e605 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismExceptionTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismExceptionTest.java
@@ -40,18 +40,6 @@ import junit.framework.TestCase;
*/
public class ExemptionMechanismExceptionTest extends TestCase {
- public static void main(String[] args) {
- }
-
- /**
- * Constructor for ExemptionMechanismExceptionTests.
- *
- * @param arg0
- */
- public ExemptionMechanismExceptionTest(String arg0) {
- super(arg0);
- }
-
static String[] msgs = {
"",
"Check new message",
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismSpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismSpiTest.java
index e694e55..793edcb 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismSpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ExemptionMechanismSpiTest.java
@@ -89,15 +89,6 @@ class Mock_ExemptionMechanismSpi extends MyExemptionMechanismSpi{
}
/**
- * Constructor for ExemptionMechanismSpiTests.
- *
- * @param arg0
- */
- public ExemptionMechanismSpiTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>ExemptionMechanismSpi</code> constructor Assertion:
* constructs ExemptionMechanismSpi
* @throws Exception
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/IllegalBlockSizeExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/IllegalBlockSizeExceptionTest.java
index d99e003..b98297d 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/IllegalBlockSizeExceptionTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/IllegalBlockSizeExceptionTest.java
@@ -40,18 +40,6 @@ import junit.framework.TestCase;
*/
public class IllegalBlockSizeExceptionTest extends TestCase {
- public static void main(String[] args) {
- }
-
- /**
- * Constructor for IllegalBlockSizeExceptionTests.
- *
- * @param arg0
- */
- public IllegalBlockSizeExceptionTest(String arg0) {
- super(arg0);
- }
-
static String[] msgs = {
"",
"Check new message",
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementSpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementSpiTest.java
index 6617ea1..3954608 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementSpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementSpiTest.java
@@ -22,11 +22,6 @@
package org.apache.harmony.crypto.tests.javax.crypto;
-import dalvik.annotation.TestTargetClass;
-import dalvik.annotation.TestTargets;
-import dalvik.annotation.TestLevel;
-import dalvik.annotation.TestTargetNew;
-
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
@@ -34,13 +29,17 @@ import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
+import javax.crypto.KeyAgreementSpi;
import javax.crypto.SecretKey;
import javax.crypto.ShortBufferException;
-import javax.crypto.KeyAgreementSpi;
+
+import junit.framework.TestCase;
import org.apache.harmony.crypto.tests.support.MyKeyAgreementSpi;
-import junit.framework.TestCase;
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
@TestTargetClass(KeyAgreementSpi.class)
/**
@@ -52,7 +51,8 @@ public class KeyAgreementSpiTest extends TestCase {
class Mock_KeyAgreementSpi extends MyKeyAgreementSpi {
@Override
- protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException {
+ protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException,
+ IllegalStateException {
return super.engineDoPhase(key, lastPhase);
}
@@ -62,12 +62,14 @@ public class KeyAgreementSpiTest extends TestCase {
}
@Override
- protected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException {
+ protected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException,
+ NoSuchAlgorithmException, InvalidKeyException {
return super.engineGenerateSecret(algorithm);
}
@Override
- protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException {
+ protected int engineGenerateSecret(byte[] sharedSecret, int offset)
+ throws IllegalStateException, ShortBufferException {
return super.engineGenerateSecret(sharedSecret, offset);
}
@@ -77,18 +79,11 @@ public class KeyAgreementSpiTest extends TestCase {
}
@Override
- protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
+ protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random)
+ throws InvalidKeyException, InvalidAlgorithmParameterException {
super.engineInit(key, params, random);
}
-
- }
- /**
- * Constructor for KeyAgreementSpiTests.
- *
- * @param arg0
- */
- public KeyAgreementSpiTest(String arg0) {
- super(arg0);
+
}
/**
@@ -113,10 +108,8 @@ public class KeyAgreementSpiTest extends TestCase {
} catch (IllegalStateException e) {
}
byte[] bb = kaSpi.engineGenerateSecret();
- assertEquals("Length is not 0", bb.length, 0);
- assertEquals("Returned integer is not 0",
- kaSpi.engineGenerateSecret(new byte[1], 10),
- -1);
+ assertEquals("Length is not 0", bb.length, 0);
+ assertEquals("Returned integer is not 0", kaSpi.engineGenerateSecret(new byte[1], 10), -1);
assertNull("Not null result", kaSpi.engineGenerateSecret("aaa"));
try {
kaSpi.engineGenerateSecret("");
@@ -134,6 +127,6 @@ public class KeyAgreementSpiTest extends TestCase {
kaSpi.engineInit(key, params, new SecureRandom());
fail("IllegalArgumentException must be thrown");
} catch (IllegalArgumentException e) {
- }
+ }
}
}
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementTest.java
index ed57596..220c6c6 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyAgreementTest.java
@@ -22,6 +22,7 @@
package org.apache.harmony.crypto.tests.javax.crypto;
+import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
@@ -921,6 +922,7 @@ public class KeyAgreementTest extends TestCase {
method = "engineGenerateSecret",
args = {java.lang.String.class}
)})
+ @KnownFailure("Does not throw expected exception")
public void test_generateSecretLjava_lang_String() throws Exception {
if (!DEFSupported) {
fail(NotSupportMsg);
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyGeneratorSpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyGeneratorSpiTest.java
index bcf2635..0605986 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyGeneratorSpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/KeyGeneratorSpiTest.java
@@ -44,48 +44,36 @@ import junit.framework.TestCase;
*/
public class KeyGeneratorSpiTest extends TestCase {
-class Mock_KeyGeneratorSpi extends MyKeyGeneratorSpi {
+ class Mock_KeyGeneratorSpi extends MyKeyGeneratorSpi {
- @Override
- protected SecretKey engineGenerateKey() {
- return super.engineGenerateKey();
- }
+ @Override
+ protected SecretKey engineGenerateKey() {
+ return super.engineGenerateKey();
+ }
- @Override
- protected void engineInit(SecureRandom random) {
- super.engineInit(random);
- }
+ @Override
+ protected void engineInit(SecureRandom random) {
+ super.engineInit(random);
+ }
- @Override
- protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException {
- super.engineInit(params, random);
- }
+ @Override
+ protected void engineInit(AlgorithmParameterSpec params, SecureRandom random)
+ throws InvalidAlgorithmParameterException {
+ super.engineInit(params, random);
+ }
+
+ @Override
+ protected void engineInit(int keysize, SecureRandom random) {
+ super.engineInit(keysize, random);
+ }
- @Override
- protected void engineInit(int keysize, SecureRandom random) {
- super.engineInit(keysize, random);
- }
-
-}
- /**
- * Constructor for KeyGeneratorSpiTests.
- *
- * @param arg0
- */
- public KeyGeneratorSpiTest(String arg0) {
- super(arg0);
}
/**
* Test for <code>KeyGeneratorSpi</code> constructor Assertion: constructs
* KeyGeneratorSpi
*/
- @TestTargetNew(
- level = TestLevel.COMPLETE,
- notes = "",
- method = "KeyGeneratorSpi",
- args = {}
- )
+ @TestTargetNew(level = TestLevel.COMPLETE, notes = "", method = "KeyGeneratorSpi", args = {})
public void testKeyGeneratorSpi01() throws InvalidAlgorithmParameterException {
Mock_KeyGeneratorSpi kgSpi = new Mock_KeyGeneratorSpi();
assertNull("Not null result", kgSpi.engineGenerateKey());
@@ -99,17 +87,18 @@ class Mock_KeyGeneratorSpi extends MyKeyGeneratorSpi {
fail("IllegalArgumentException must be thrown");
} catch (IllegalArgumentException e) {
}
- AlgorithmParameterSpec aps = null;
+ AlgorithmParameterSpec aps = null;
try {
kgSpi.engineInit(aps, new SecureRandom());
- fail("InvalidAlgorithmParameterException must be thrown when parameter is null");
- } catch (InvalidAlgorithmParameterException e) {
- }
- aps = new APSpecSpi();
- kgSpi.engineInit(aps, new SecureRandom());
+ fail("InvalidAlgorithmParameterException must be thrown when parameter is null");
+ } catch (InvalidAlgorithmParameterException e) {
+ }
+ aps = new APSpecSpi();
+ kgSpi.engineInit(aps, new SecureRandom());
}
}
+
class APSpecSpi implements AlgorithmParameterSpec {
-
+
}
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacSpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacSpiTest.java
index d7a2ec1..270adaa 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacSpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacSpiTest.java
@@ -160,15 +160,6 @@ class Mock_MacSpi2 extends MyMacSpi2 {
}
-/**
- * Constructor for MacSpiTests.
- *
- * @param arg0
- */
- public MacSpiTest(String arg0) {
- super(arg0);
- }
-
/**
* Test for <code>MacSpi</code> constructor
* Assertion: constructs MacSpi
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/NoSuchPaddingExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/NoSuchPaddingExceptionTest.java
index 01418c8..da4a94d 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/NoSuchPaddingExceptionTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/NoSuchPaddingExceptionTest.java
@@ -40,18 +40,6 @@ import junit.framework.TestCase;
*/
public class NoSuchPaddingExceptionTest extends TestCase {
- public static void main(String[] args) {
- }
-
- /**
- * Constructor for NoSuchPaddingExceptionTests.
- *
- * @param arg0
- */
- public NoSuchPaddingExceptionTest(String arg0) {
- super(arg0);
- }
-
static String[] msgs = {
"",
"Check new message",
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactorySpiTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactorySpiTest.java
index 4b383d7..bcc05a2 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactorySpiTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactorySpiTest.java
@@ -16,9 +16,9 @@
*/
/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
+ * @author Vera Y. Petrashkova
+ * @version $Revision$
+ */
package org.apache.harmony.crypto.tests.javax.crypto;
@@ -36,10 +36,8 @@ import org.apache.harmony.crypto.tests.support.MySecretKeyFactorySpi;
import junit.framework.TestCase;
-
/**
* Tests for <code>SecretKeyFactorySpi</code> class constructors and methods.
- *
*/
@TestTargetClass(SecretKeyFactorySpi.class)
@@ -52,7 +50,8 @@ public class SecretKeyFactorySpiTest extends TestCase {
}
@Override
- protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException {
+ protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec)
+ throws InvalidKeySpecException {
return super.engineGetKeySpec(key, keySpec);
}
@@ -60,31 +59,15 @@ public class SecretKeyFactorySpiTest extends TestCase {
protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException {
return super.engineTranslateKey(key);
}
-
- }
- /**
- * Constructor for SecretKeyfactorySpiTests.
- *
- * @param arg0
- */
- public SecretKeyFactorySpiTest(String arg0) {
- super(arg0);
}
/**
- *
* Test for <code>SecretKeyFactorySpi</code> constructor Assertion:
* constructs SecretKeyFactorySpi
*/
- @TestTargetNew(
- level = TestLevel.COMPLETE,
- notes = "",
- method = "SecretKeyFactorySpi",
- args = {}
- )
- public void testSecretKeyFactorySpi01() throws InvalidKeyException,
- InvalidKeySpecException {
+ @TestTargetNew(level = TestLevel.COMPLETE, notes = "", method = "SecretKeyFactorySpi", args = {})
+ public void testSecretKeyFactorySpi01() throws InvalidKeyException, InvalidKeySpecException {
Mock_SecretKeyFactorySpi skfSpi = new Mock_SecretKeyFactorySpi();
SecretKey sk = null;
assertNull("Not null result", skfSpi.engineTranslateKey(sk));
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyTest.java
index 7941972..4e34ed2 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyTest.java
@@ -40,15 +40,6 @@ import junit.framework.TestCase;
public class SecretKeyTest extends TestCase {
/**
- * Constructor for SecretKeyTest.
- *
- * @param arg0
- */
- public SecretKeyTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>serialVersionUID</code> field
*/
@TestTargetNew(
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ShortBufferExceptionTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ShortBufferExceptionTest.java
index 9121275..4390994 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ShortBufferExceptionTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ShortBufferExceptionTest.java
@@ -38,18 +38,6 @@ import junit.framework.TestCase;
*/
public class ShortBufferExceptionTest extends TestCase {
- public static void main(String[] args) {
- }
-
- /**
- * Constructor for ShortBufferExceptionTests.
- *
- * @param arg0
- */
- public ShortBufferExceptionTest(String arg0) {
- super(arg0);
- }
-
static String[] msgs = {
"",
"Check new message",
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java
index 1ba0d00..862cced 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/AllTests.java
@@ -38,7 +38,6 @@ public class AllTests {
suite.addTestSuite(CipherAesWrapTest.class);
suite.addTestSuite(CipherDESedeTest.class);
suite.addTestSuite(CipherDESedeWrapTest.class);
- suite.addTestSuite(CipherSymmetricKeyThread.class);
suite.addTestSuite(CipherPBETest.class);
suite.addTestSuite(CipherRSATest.class);
suite.addTestSuite(KeyGeneratorFunctionalTest.class);
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesTest.java
index 446ade3..ce62332 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesTest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.AES.class)
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesWrapTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesWrapTest.java
index 0e7e7e1..2c75abd 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesWrapTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherAesWrapTest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.AESWrap.class)
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeTest.java
index 27113c6..c6053b6 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeTest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.DESede.class)
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeWrapTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeWrapTest.java
index 05eed26..e2c9c9e 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeWrapTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDESedeWrapTest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetClass;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.DESedeWrap.class)
@@ -33,7 +32,7 @@ public class CipherDESedeWrapTest extends TestCase {
method = "method",
args = {}
)
- public void _test_DESedeWrap() {
+ public void test_DESedeWrap() {
CipherWrapThread DESedeWrap = new CipherWrapThread("DESedeWrap",
new int[]{112, 168},
new String[] {"CBC"},
@@ -43,15 +42,4 @@ public class CipherDESedeWrapTest extends TestCase {
assertEquals(DESedeWrap.getFailureMessages(), 0, DESedeWrap.getTotalFailuresNumber());
}
-
- public void test_DESede() {
- CipherWrapThread DESedeWrap = new CipherWrapThread("DESede",
- new int[]{112, 168},
- new String[] {"CBC"},
- new String[]{"NoPadding"});
-
- DESedeWrap.launcher();
-
- assertEquals(DESedeWrap.getFailureMessages(), 0, DESedeWrap.getTotalFailuresNumber());
- }
}
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDesTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDesTest.java
index 3417d92..7b11ae9 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDesTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherDesTest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.DES.class)
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherPBETest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherPBETest.java
index 5f97064..a3fb3c2 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherPBETest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherPBETest.java
@@ -21,13 +21,8 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
-import java.security.NoSuchAlgorithmException;
-
-import javax.crypto.SecretKeyFactory;
-
@TestTargetClass(Cipher.PBE.class)
public class CipherPBETest extends TestCase {
// 2 cases checked
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherRSATest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherRSATest.java
index 3071287..90cb956 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherRSATest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/CipherRSATest.java
@@ -21,7 +21,6 @@ import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-
import targets.Cipher;
@TestTargetClass(Cipher.RSA.class)
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyAgreementFunctionalTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyAgreementFunctionalTest.java
index fbb5f64..d0e5f6a 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyAgreementFunctionalTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyAgreementFunctionalTest.java
@@ -15,28 +15,23 @@
*/
package org.apache.harmony.crypto.tests.javax.crypto.func;
-import junit.framework.TestCase;
-
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
-import java.math.BigInteger;
-import java.security.AlgorithmParameterGenerator;
-import java.security.AlgorithmParameters;
-import java.security.Key;
-import java.security.KeyFactory;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.SecureRandom;
-import java.security.spec.X509EncodedKeySpec;
-import java.util.Formatter;
+import junit.framework.TestCase;
-import javax.crypto.KeyAgreement;
-import javax.crypto.SecretKey;
-import javax.crypto.spec.DHParameterSpec;
+import targets.KeyAgreement;
+@TestTargetClass(KeyAgreement.DH.class)
public class KeyAgreementFunctionalTest extends TestCase {
- public void test_() throws Exception {
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ method = "method",
+ args = {}
+ )
+ public void test_KeyAgreement() throws Exception {
String[] algArray = {"DES", "DESede"};
KeyAgreementThread kat = new KeyAgreementThread(algArray);
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyGeneratorFunctionalTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyGeneratorFunctionalTest.java
index 87546a9..dde6fbd 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyGeneratorFunctionalTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/KeyGeneratorFunctionalTest.java
@@ -22,13 +22,8 @@ import dalvik.annotation.TestTargets;
import junit.framework.TestCase;
-
import targets.KeyGenerator;
-import java.security.Key;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
@TestTargetClass(KeyGenerator.AES.class)
public class KeyGeneratorFunctionalTest extends TestCase {
@TestTargets({
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/MacFunctionalTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/MacFunctionalTest.java
index 0736c3d..bfe486a 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/MacFunctionalTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/MacFunctionalTest.java
@@ -15,16 +15,54 @@
*/
package org.apache.harmony.crypto.tests.javax.crypto.func;
-import junit.framework.TestCase;
-
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
+import dalvik.annotation.TestTargets;
-import java.security.NoSuchAlgorithmException;
+import junit.framework.TestCase;
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
+import targets.Mac;
+@TestTargetClass(Mac.HMACMD5.class)
public class MacFunctionalTest extends TestCase {
- public void test_() throws Exception {
+@TestTargets({
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = Mac.HMACSHA1.class,
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = Mac.HMACSHA256.class,
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = Mac.HMACSHA384.class,
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = Mac.HMACSHA512.class,
+ method = "method",
+ args = {}
+ )
+})
+ public void test_Mac() throws Exception {
String[] algArray = {"HMACSHA1", "HMACSHA256", "HMACSHA384",
"HMACSHA512", "HMACMD5"};
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/SecretKeyFactoryFunctionalTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/SecretKeyFactoryFunctionalTest.java
index e2ec4bc..286bb5b 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/SecretKeyFactoryFunctionalTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/SecretKeyFactoryFunctionalTest.java
@@ -15,20 +15,39 @@
*/
package org.apache.harmony.crypto.tests.javax.crypto.func;
-import junit.framework.TestCase;
-
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
+import dalvik.annotation.TestTargets;
-import java.security.NoSuchAlgorithmException;
-import java.security.spec.KeySpec;
+import junit.framework.TestCase;
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.DESKeySpec;
-import javax.crypto.spec.DESedeKeySpec;
-import javax.crypto.spec.PBEKeySpec;
+import targets.SecretKeyFactory;
+@TestTargetClass(SecretKeyFactory.DES.class)
public class SecretKeyFactoryFunctionalTest extends TestCase {
-
+@TestTargets({
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = SecretKeyFactory.DESede.class,
+ method = "method",
+ args = {}
+ ),
+ @TestTargetNew(
+ level = TestLevel.COMPLETE,
+ notes = "",
+ clazz = SecretKeyFactory.PBEWITHMD5ANDDES.class,
+ method = "method",
+ args = {}
+ )
+})
public void test_() throws Exception {
String[] algArray = {"DES", "DESede", "PBEWITHMD5ANDDES",
"PBEWithSHA1AndDESede", "PBEWithSHA1AndRC2_40"};
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPrivateKeyTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPrivateKeyTest.java
index 9ab8d02..f47d693 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPrivateKeyTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPrivateKeyTest.java
@@ -22,20 +22,19 @@
package org.apache.harmony.crypto.tests.javax.crypto.interfaces;
-import dalvik.annotation.TestLevel;
-import dalvik.annotation.TestTargetClass;
-import dalvik.annotation.TestTargetNew;
-import dalvik.annotation.TestTargets;
+import java.math.BigInteger;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
import javax.crypto.interfaces.DHKey;
import javax.crypto.interfaces.DHPrivateKey;
import javax.crypto.spec.DHParameterSpec;
import junit.framework.TestCase;
-
-import java.math.BigInteger;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
+import dalvik.annotation.TestLevel;
+import dalvik.annotation.TestTargetClass;
+import dalvik.annotation.TestTargetNew;
+import dalvik.annotation.TestTargets;
/**
@@ -46,15 +45,6 @@ import java.security.KeyPairGenerator;
public class DHPrivateKeyTest extends TestCase {
/**
- * Constructor for DHPrivateKey.
- *
- * @param arg0
- */
- public DHPrivateKeyTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>serialVersionUID</code> field
*/
@TestTargetNew(
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPublicKeyTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPublicKeyTest.java
index 274a221..2ca738e 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPublicKeyTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/DHPublicKeyTest.java
@@ -46,15 +46,6 @@ import javax.crypto.spec.DHParameterSpec;
public class DHPublicKeyTest extends TestCase {
/**
- * Constructor for DHPublicKey.
- *
- * @param arg0
- */
- public DHPublicKeyTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>serialVersionUID</code> field
*/
@TestTargetNew(
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/PBEKeyTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/PBEKeyTest.java
index cee9634..43d9265 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/PBEKeyTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/PBEKeyTest.java
@@ -42,15 +42,6 @@ public class PBEKeyTest extends TestCase {
/**
- * Constructor for PBEKey.
- *
- * @param arg0
- */
- public PBEKeyTest(String arg0) {
- super(arg0);
- }
-
- /**
* Test for <code>serialVersionUID</code> field
*/
@TestTargetNew(
diff --git a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java
index f7a762f..5eeb76f 100644
--- a/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java
+++ b/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/SecretKeySpecTest.java
@@ -22,7 +22,6 @@
package org.apache.harmony.crypto.tests.javax.crypto.spec;
-import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargetNew;
@@ -161,7 +160,6 @@ public class SecretKeySpecTest extends TestCase {
method = "SecretKeySpec",
args = {byte[].class, int.class, int.class, java.lang.String.class}
)
- @KnownFailure("Constructor does not check if offset is negative")
public void testSecretKeySpec3() {
byte[] key = new byte[] {1, 2, 3, 4, 5};
int offset = 1;