1 20 21 package net.sourceforge.lightcrypto.test; 22 23 import junit.framework.TestCase; 24 import net.sourceforge.lightcrypto.Key; 25 import net.sourceforge.lightcrypto.SafeObject; 26 27 37 38 public class KeyTest extends TestCase { 39 44 public void testGenerateKey() throws Exception { 45 Key.generatekey(RunTest.TEMPFOLDER + "tempkey.key",new StringBuffer ("password"), new StringBuffer ("123456789")); 46 } 47 48 53 public void testLoadKey() throws Exception { 54 SafeObject k = new SafeObject(); 55 k = Key.loadkey(RunTest.TEMPFOLDER + "tempkey.key",new StringBuffer ("password")); 56 } 57 } 58 | Popular Tags |