1 21 22 package net.sourceforge.jcetaglib.test; 23 24 import junit.framework.Test; 25 import junit.framework.TestSuite; 26 27 37 public class RunTest { 38 39 public final static String TEMPFOLDER = "C:/tmp/"; 41 42 public final static String [][] alg = { 44 {"AES", "128"} 45 , {"AES", "192"} 46 , {"AES", "256"} 47 , {"Blowfish", "128"} 48 , {"Blowfish", "192"} 49 , {"Blowfish", "256"} 50 , {"Blowfish", "448"} 51 , {"CAST5", "128"} 52 , {"CAST6", "256"} 53 , {"DES", "64"} 54 , {"DESede", "192"} 55 , {"IDEA", "128"} 56 , {"RC2", "1024"} 57 , {"RC4", "128"} 58 , {"RC5", "128"} 59 , {"RC6", "128"} 60 , {"Rijndael", "128"} 61 , {"Rijndael", "192"} 62 , {"Rijndael", "256"} 63 , {"Skipjack", "128"} 64 , {"Twofish", "128"} 65 , {"Twofish", "192"} 66 , {"Twofish", "256"} 67 , {"Serpent", "128"} 68 , {"Serpent", "192"} 69 , {"Serpent", "256"} 70 }; 71 72 public final static String [] modes = { 73 "ECB" 74 , "CBC" 75 , "OFB8" 76 , "CFB8"}; 77 78 public final static String [] padding = { 79 "PKCS7Padding" 80 , "ISO10126Padding" 81 , "X9.23Padding"}; 82 83 public final static String [] pbealg = { 84 "PBEWithMD5AndDES" 85 , "PBEWithSHAAnd2-KeyTripleDES-CBC" 86 , "PBEWithSHAAnd3-KeyTripleDES-CBC" 87 , "PBEWithSHAAnd128BitRC2-CBC" 88 , "PBEWithSHAAnd40BitRC2-CBC" 89 , "PBEWithSHAAnd128BitRC4" 90 , "PBEWithSHAAnd40BitRC4" 91 , "PBEWithSHAAndTwofish-CBC" 92 , "PBEWithSHAAndIDEA-CBC"}; 93 94 public final static String [] digestalg = { 95 "MD2" 96 , "MD4" 97 , "MD5" 98 , "RipeMD128" 99 , "RipeMD160" 100 , "SHA1" 101 , "SHA-256" 102 , "SHA-384" 103 , "SHA-512" 104 , "Tiger"}; 105 106 public final static String [][] macalg = { 107 {"IDEA", "IDEA_128.key"} 108 , {"DESede", "DESede_192.key"} 109 , {"DES", "DES_64.key"} 110 , {"RC2", "RC2_1024.key"} 111 , {"RC5", "RC5_128.key"} 112 , {"Skipjack", "Skipjack_128.key"} 113 , {"IDEA/CFB8", "IDEA_128.key"} 114 , {"DESede/CFB8", "DESede_192.key"} 115 , {"DES/CFB8", "DES_64.key"} 116 , {"RC2/CFB8", "RC2_1024.key"} 117 , {"RC5/CFB8", "RC5_128.key"} 118 , {"Skipjack/CFB8", "Skipjack_128.key"} 119 , {"HMac-SHA1", "IDEA_128.key"} 120 , {"HMac-SHA256", "IDEA_128.key"} 121 , {"HMac-SHA384", "IDEA_128.key"} 122 , {"HMac-SHA512", "IDEA_128.key"} 123 , {"HMac-MD2", "IDEA_128.key"} 124 , {"HMac-MD4", "IDEA_128.key"} 125 , {"HMac-MD5", "IDEA_128.key"} 126 , {"HMac-RipeMD128", "IDEA_128.key"} 127 , {"HMac-RipeMD160", "IDEA_128.key"} 128 }; 129 130 public final static String [] sig = { 131 "SHA1WithRSAEncryption" 132 , "MD2WithRSAEncryption" 133 , "MD5WithRSAEncryption" 134 , "RIPEMD160WithRSAEncryption" 135 , "MD5WithRSA/ISO9796-2" 136 , "SHA1WithRSA/ISO9796-2" 137 , "RIPEMD160WithRSA/ISO9796-2" 138 }; 139 140 public final static StringBuffer [] text = { 141 new StringBuffer ("The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms") 142 , new StringBuffer ("This software is distributed under a license based on the MIT X Consortium license") 143 , new StringBuffer ("found in $JAVA_HOME/jre/lib/security/java.security, where $JAVA_HOME is the location of your JDK/JRE distribution") 144 , new StringBuffer ("Mit Project 2002 zum erfolgreichen Projektmanagement Damit Sie in Zukunft Ihre Projekte präzise und komfortabel steuern können") 145 , new StringBuffer ("En av de största nyheterna är att det finns en .NET Enterprise Server-lösning för stora företagsomspännade projekt") 146 , new StringBuffer ("Lees de productinformatie en ontdek alles over de krachtige tools binnen Visual Studio .NET") 147 , new StringBuffer ("Vergeet even die oude tovenaars met puntige hoeden en rondborstige jonkvrouwen in nood... oké, vergeet in ieder geval even die tovenaars, want Lionheart komt met een ambitieuze rollenspelvariant") 148 , new StringBuffer ("An implementation of ECIES (stream mode) as described in IEEE P 1363a.") 149 , new StringBuffer ("This makes the entire keystore resistant to tampering and inspection, and forces verification") 150 , new StringBuffer ("application/pkcs7-signature;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.pkcs7_signature") 151 }; 152 153 158 public static Test suite() { 159 TestSuite suite = new TestSuite("net.sourceforge.jcetaglib"); 160 suite.addTestSuite(KeyTest.class); 161 suite.addTestSuite(DigestTest.class); 162 suite.addTestSuite(CryptTest.class); 163 suite.addTestSuite(AsymmetricTest.class); 164 suite.addTestSuite(PBETest.class); 165 suite.addTestSuite(MacTest.class); 166 suite.addTestSuite(SignatureTest.class); 167 suite.addTestSuite(HybridTest.class); 168 suite.addTestSuite(X509CertTest.class); 169 suite.addTestSuite(DHKeyAgreementTest.class); 170 return suite; 171 } 172 173 178 public static void main(String args[]) { 179 junit.textui.TestRunner.run(suite()); 180 } 181 } 182 183 | Popular Tags |