[Webfunds-commits] java/webfunds/sox Armoury.java
Jeroen C. van Gelderen
gelderen@cypherpunks.ai
Thu, 13 Jul 2000 20:29:04 -0400 (AST)
gelderen 00/07/13 20:29:04
Modified: webfunds/sox Armoury.java
Log:
- Remove unused function that use sun.security.util;
- Fix modifier disorder;
Revision Changes Path
1.26 +3 -31 java/webfunds/sox/Armoury.java
Index: Armoury.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Armoury.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Armoury.java 2000/07/14 00:12:07 1.25
+++ Armoury.java 2000/07/14 00:29:04 1.26
@@ -1,4 +1,4 @@
-/* $Id: Armoury.java,v 1.25 2000/07/14 00:12:07 gelderen Exp $
+/* $Id: Armoury.java,v 1.26 2000/07/14 00:29:04 gelderen Exp $
*
* Copyright (c) Systemics Inc. 1995-2000 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -8,7 +8,6 @@
import java.io.*;
import java.security.*;
-import sun.security.util.DerValue;
import sun.security.x509.X509Cert;
import sun.security.x509.X509Key;
@@ -37,12 +36,12 @@
* <a href="http://www.imc.org/rfc2045">http://www.imc.org/rfc2045</a>
* </ol>
*
- * @version $Revision: 1.25 $
+ * @version $Revision: 1.26 $
*/
public abstract class Armoury
{
static int linecount = 0;
- private final static int
+ private static final int
WAITING = 0,
PACKET = 1,
PACKET_START = 2,
@@ -406,33 +405,6 @@
{
return encode("PUBLIC KEY", key.getEncoded());
}
-
-
- /**
- * Decode an PublicKey object from ascii-armoured Base64 encoding
- * <p>
- * The PublicKey is usually an instance of X509Key.
- *
- * @param buf a String containing the base64 encoded PublicKey
- * @return the PublicKey object (usually an X509Key)
- * @exception InvalidKeyException thrown if public key is invalid (i.e. badly formatted)
- * @see PublicKey
- * @see X509Key
- */
- public static PublicKey decodePublicKey(String buf)
- throws InvalidKeyException
- {
- try
- {
- byte[] raw = decodeByteArray("PUBLIC KEY", buf);
- return X509Key.parse(new DerValue(raw));
- }
- catch (IOException e)
- {
- throw new InvalidKeyException("Bad char / padding in armoured key");
- }
- }
-
/**