@@ -0,0 +1,879 @@
+/*%0Amkdir out%0Ajavac -d out -cp bcprov-jdk16-140.jar:hamcrest-core-1.3.jar:junit-4.11.jar:android.jar AesCbcPadding.java AesCbcPaddingTests.java%0Ajava -cp jdk16-140.jar:hamcrest-core-1.3.jar:junit-4.11.jar:android.jar:out org.junit.runner.JUnitCore com.tozny.crypto.basicaescbc.AesCbcPaddingTests%0Aexit%0A%0AYou can run this like ./AesCbcPaddingTests.java, assuming you have the above jars in this same%0Adirectory.%0A*/%0A%0Apackage com.tozny.crypto.basicaescbc;%0A%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0Apublic class AesCbcPaddingTests %7B%0A    @Test%0A    public void testEncryptionDecryptionWorks() throws Exception %7B%0A        AesCbcPadding.prngFixed.set(true);%0A        AesCbcPadding.SecretKeys keys = AesCbcPadding.generateKey();%0A        String plain = AesCbcPadding.decryptString(AesCbcPadding.encrypt(%22some test%22, keys), keys);%0A        assertEquals(%22some test%22, plain);%0A    %7D%0A%7D

Add some basic tests