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

Ian Grigg iang@cypherpunks.ai
Thu, 30 Nov 2000 09:40:10 -0400 (AST)


iang        00/11/30 09:40:09

  Modified:    webfunds/sox PaymentFactory.java
  Log:
  base 64 names for Float account name, dropped shortness test (kept tripping)

Revision  Changes    Path
1.6       +9 -4      java/webfunds/sox/PaymentFactory.java

Index: PaymentFactory.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/PaymentFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PaymentFactory.java	2000/11/09 13:13:50	1.5
+++ PaymentFactory.java	2000/11/30 13:40:09	1.6
@@ -1,4 +1,4 @@
-/* $Id: PaymentFactory.java,v 1.5 2000/11/09 13:13:50 iang Exp $
+/* $Id: PaymentFactory.java,v 1.6 2000/11/30 13:40:09 iang Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * The WebFunds Development Team. All Rights Reserved.
@@ -19,13 +19,20 @@
                                    RANDOM_TOKEN = 2,
                                    WAGNER_TOKEN = 3;
 
-    private static final String[] typeNames = {
+    public static final String[] typeNames = {
                                    "None?",
                                    "SOX Cheque",
                                    "Random Token", 
                                    "Wagner Token"
                                   };
 
+    public static final String[] base64Type = {
+                                   null,
+                                   null,
+                                   "Random", 
+                                   "Wagner"
+                                  };
+
     private PaymentFactory() {}
 
 
@@ -35,8 +42,6 @@
         
         if (buf == null)
             throw new IllegalArgumentException("PaymentFactory.decode(null)");
-        if (buf.length < 100)
-            throw new SOXPacketException("too short?  " + buf.length);
 
         int pv = buf[0];            // factory version, old Pay == 0
         int sv = buf[1];            // within factory, sub version