[Webfunds-commits] java/webfunds/sox Armoury.java

Ian Grigg iang@cypherpunks.ai
Sat, 5 Aug 2000 09:00:09 -0400 (AST)


iang        00/08/05 09:00:09

  Modified:    webfunds/sox Armoury.java
  Log:
  mostly comment changes, but also some minor changes to params that seem
  to be missed.

Revision  Changes    Path
1.30      +15 -23    java/webfunds/sox/Armoury.java

Index: Armoury.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Armoury.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Armoury.java	2000/07/21 21:31:18	1.29
+++ Armoury.java	2000/08/05 13:00:09	1.30
@@ -1,4 +1,4 @@
-/* $Id: Armoury.java,v 1.29 2000/07/21 21:31:18 gelderen Exp $
+/* $Id: Armoury.java,v 1.30 2000/08/05 13:00:09 iang Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -36,7 +36,7 @@
  *        <a href="http://www.imc.org/rfc2045">http://www.imc.org/rfc2045</a>
  * </ol>
  *
- * @version $Revision: 1.29 $
+ * @version $Revision: 1.30 $
  */
 public abstract class Armoury
 {
@@ -341,12 +341,10 @@
 
 
     /**
-     * Encode an X509Cert object, using ascii-armoured Base64 encoding
-     * (better known as PEM encoding in the X509 world)
+     * Encode a Certificate object, using ascii-armoured Base64 encoding
      *
-     * @param cert the X509 certificate object to be encoded
-     * @return the PEM encoded X509 certificate
-     * @see X509Cert
+     * @param cert the certificate object to be encoded
+     * @return the ascii-armoured certificate
      */
     public static String encodeCert(Certificate cert)
     {
@@ -363,12 +361,10 @@
     }
       
     /**
-     * Decode an X509Cert object from ascii-armoured Base64 encoding
-     * (better known as PEM encoding in the X509 world)
+     * Decode a Certificate object from ascii-armoured Base64 encoding
      *
-     * @param buf a String containing the PEM encoded X509 certificate 
-     * @return the X509Cert object
-     * @see X509Cert
+     * @param buf a String containing the ascii-armoured certificate 
+     * @return the Certificate object
      */
     public static Certificate decodeCert(String buf)
         throws SOXKeyException // , InvalidChecksumException
@@ -395,12 +391,10 @@
     /**
      * Encode a PublicKey object using ascii-armoured Base64 encoding
      * <p>
-     * The PublicKey is usually an instance of X509Key.
      *
      * @param key the PublicKey object to be encoded
      * @return the base64 encoded PublicKey object
      * @see PublicKey
-     * @see X509Key
      */
     public static String encodePublicKey(PublicKey key)
     {
@@ -414,7 +408,6 @@
      * @param key the PrivateKey object to be encoded
      * @return the base64 encoded PrivateKey object
      * @see PrivateKey
-     * @see X509Key
      */
     public static String encodePrivateKey(PrivateKey key)
     {
@@ -426,9 +419,8 @@
      * Decode an PrivateKey object from ascii-armoured Base64 encoding
      *
      * @param buf a String containing the base64 encoded PrivateKey
-     * @return the PrivateKey object (usually an X509Key)
+     * @return the PrivateKey object
      * @see PrivateKey
-     * @see X509Key
      */
     public static PrivateKey decodePrivateKey(String buf)
         throws InvalidKeyException
@@ -446,7 +438,7 @@
 
 
     /**
-     * Encode an X509 Signature (stored in a byte array) using
+     * Encode a Signature (stored in a byte array) using
      * ascii-armoured Base64 encoding
      *
      * @param keyPair the KeyPair object to be encoded
@@ -459,10 +451,10 @@
 
 
     /**
-     * Decode an X509 signature from ascii-armoured Base64 encoding
+     * Decode a Signature from ascii-armoured Base64 encoding
      *
      * @param buf a String containing the base64 encoded signature
-     * @return the X.509 signature (stored in a byte array)
+     * @return the signature (stored in a byte array)
      * @bug see bug in decodeByteArray()
      */
     public static byte[] decodeSig(String buf)
@@ -474,10 +466,10 @@
     /**
      * Create the signed data
      * @param  data the original data (not the preparedToSign data)
-     * @param binaryX509Signature the signature of the signedData
+     * @param binary Signature the signature of the signedData
      * @return the Signed Data
      */
-    public static String createSignedData(byte[] data, byte[] binaryX509Signature)
+    public static String createSignedData(byte[] data, byte[] binarySignature)
         throws IOException,FileNotFoundException ,java.security.KeyException
     {
         BufferedReader bufr = new BufferedReader(new InputStreamReader (new ByteArrayInputStream(data)));
@@ -496,7 +488,7 @@
       
         // Append the ascii-armoured signature
         //      result += newline;
-        result += Armoury.encodeSig(binaryX509Signature);
+        result += Armoury.encodeSig(binarySignature);
 
         return result;
      }