|
From: <pe...@us...> - 2004-03-09 00:07:20
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23642/src/java/org/neuclear/commons/crypto Modified Files: CryptoTools.java Log Message: More improvements on the XMLSignature. Now uses the Transforms properly, References properly. All the major elements have been refactored to be cleaner and more correct. Index: CryptoTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/CryptoTools.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CryptoTools.java 5 Mar 2004 23:43:06 -0000 1.15 --- CryptoTools.java 8 Mar 2004 23:50:34 -0000 1.16 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.16 2004/03/08 23:50:34 pelle + * More improvements on the XMLSignature. Now uses the Transforms properly, References properly. + * All the major elements have been refactored to be cleaner and more correct. + * * Revision 1.15 2004/03/05 23:43:06 pelle * New Channels package with nio based channels for various crypto related tasks such as digests, signing, verifying and encoding. *************** *** 693,698 **** } ! public static KeyPair createTinyKeyPair() throws NoSuchAlgorithmException { ! return getTinyKeyPairGenerator().generateKeyPair(); } --- 697,706 ---- } ! public static KeyPair createTinyRSAKeyPair() throws NoSuchAlgorithmException { ! return getTinyRSAKeyPairGenerator().generateKeyPair(); ! } ! ! public static KeyPair createTinyDSAKeyPair() throws NoSuchAlgorithmException { ! return getTinyDSAKeyPairGenerator().generateKeyPair(); } *************** *** 712,716 **** } ! public static KeyPairGenerator getTinyKeyPairGenerator() throws NoSuchAlgorithmException { if (kg == null) { kg = KeyPairGenerator.getInstance("RSA"); --- 720,724 ---- } ! public static KeyPairGenerator getTinyRSAKeyPairGenerator() throws NoSuchAlgorithmException { if (kg == null) { kg = KeyPairGenerator.getInstance("RSA"); *************** *** 722,725 **** --- 730,743 ---- } + public static KeyPairGenerator getTinyDSAKeyPairGenerator() throws NoSuchAlgorithmException { + if (kg == null) { + kg = KeyPairGenerator.getInstance("DSA"); + + kg.initialize(512, new SecureRandom("Bear it all with NeuDist".getBytes())); + } + return kg; + + } + public static KeyPairGenerator getKeyPairGenerator(final String algorithm) throws NoSuchAlgorithmException { |