[Webfunds-commits] java/webfunds/sox Armoury.java
Jeroen C. van Gelderen
gelderen@cypherpunks.ai
Thu, 13 Jul 2000 17:13:59 -0400 (AST)
gelderen 00/07/13 17:13:59
Modified: webfunds/sox Armoury.java
Log:
- Explicify import statements.
- Remove obsolete comments.
- Reformat enum.
Revision Changes Path
1.24 +15 -35 java/webfunds/sox/Armoury.java
Index: Armoury.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Armoury.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Armoury.java 1999/11/21 01:53:25 1.23
+++ Armoury.java 2000/07/13 21:13:59 1.24
@@ -1,23 +1,23 @@
-/*
- * $Id: Armoury.java,v 1.23 1999/11/21 01:53:25 iang Exp $
+/* $Id: Armoury.java,v 1.24 2000/07/13 21:13:59 gelderen Exp $
*
- * Copyright (c) Systemics Ltd 1995-1999 on behalf of
+ * Copyright (c) Systemics Inc. 1995-2000 on behalf of
* the WebFunds Development Team. All Rights Reserved.
*/
package webfunds.sox;
import java.io.*;
import java.security.*;
-import sun.security.x509.*;
-import sun.security.util.*;
+import sun.security.util.DerValue;
+import sun.security.x509.X509Cert;
+import sun.security.x509.X509Key;
+
import webfunds.sox.utils.Base64;
/**
* This class provides methods for encoding and decoding data in MIME base64
* format. Also included are many convenience methods for encoding and
* decoding various types of object.
- *
* <p>
* All of the methods either take a byte array, a String, or an Object,
* and return a byte array or String (depending upon the method) containing
@@ -37,38 +37,18 @@
* <a href="http://www.imc.org/rfc2045">http://www.imc.org/rfc2045</a>
* </ol>
*
- * @version 1.3
+ * @version $Revision: 1.24 $
*/
public abstract class Armoury
{
-
-// protected final static byte dec_table[] =
-// {
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
-// 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-// -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-// 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
-// -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-// 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-// };
-
static int linecount = 0;
- private final static int WAITING = 0;
- private final static int PACKET = 1;
- private final static int PACKET_START = 2;
- private final static int SIGNED_DATA = 3;
- private final static int SIGNED_DATA_FIRSTLINE = 4;
- private final static int SIGNED_DATA_START = 5;
+ private final static int
+ WAITING = 0,
+ PACKET = 1,
+ PACKET_START = 2,
+ SIGNED_DATA = 3,
+ SIGNED_DATA_FIRSTLINE = 4,
+ SIGNED_DATA_START = 5;
/**
* Encode <i>data</i> as a String using base64 encoding.
@@ -517,7 +497,7 @@
* Decode an X509 signature from ascii-armoured Base64 encoding
*
* @param buf a String containing the base64 encoded signature
- * @return the x509 signature (stored in a byte array)
+ * @return the X.509 signature (stored in a byte array)
* @bug see bug in decodeByteArray()
*/
public static byte[] decodeSig(String buf)