[Webfunds-commits] java/webfunds/sox Id.java AccountId.java

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


iang        00/08/05 09:00:56

  Modified:    webfunds/sox Id.java AccountId.java
  Log:
  Added fp() a fingerprint method that returns a synopsis of the binary
  contents useful for display purposes only.

Revision  Changes    Path
1.6       +4 -3      java/webfunds/sox/Id.java

Index: Id.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Id.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Id.java	2000/06/18 21:57:17	1.5
+++ Id.java	2000/08/05 13:00:56	1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: Id.java,v 1.5 2000/06/18 21:57:17 iang Exp $
+ * $Id: Id.java,v 1.6 2000/08/05 13:00:56 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -82,8 +82,9 @@
 ////// Self-test ///////////////////////////////////
 
     /**
-     * Convert this object to a string.
-     * Note that <empty> is equivalent to <null>.
+     *  Convert this object to a string.
+     *  Note that <empty> is equivalent to <null>
+     *  as encode/decode always mangles one to the other.
      */
     public String toString()
     {



1.19      +10 -2     java/webfunds/sox/AccountId.java

Index: AccountId.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/AccountId.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- AccountId.java	2000/07/13 21:12:31	1.18
+++ AccountId.java	2000/08/05 13:00:56	1.19
@@ -1,4 +1,4 @@
-/* $Id: AccountId.java,v 1.18 2000/07/13 21:12:31 gelderen Exp $
+/* $Id: AccountId.java,v 1.19 2000/08/05 13:00:56 iang Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -14,7 +14,7 @@
  * This class represents an Account identifier,
  * which is the standard way of referring to an account.
  *
- * @version $Revision: 1.18 $
+ * @version $Revision: 1.19 $
  */
 public class AccountId extends Id
 {
@@ -63,6 +63,14 @@
             return "BEARER";
 
         return super.toString();
+    }
+
+    public String fp()
+    {
+        if (id == null || id.length == 0)
+            return "<BEARER>";
+
+        return super.fp();
     }
 
     /**