abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r562791 - /incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
Date Sun, 05 Aug 2007 00:15:24 GMT
Author: jmsnell
Date: Sat Aug  4 17:15:23 2007
New Revision: 562791

URL: http://svn.apache.org/viewvc?view=rev&rev=562791
Log:
There's no need to send the l parameter.  In fact, it's better if we don't

Modified:
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java?view=diff&rev=562791&r1=562790&r2=562791
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
Sat Aug  4 17:15:23 2007
@@ -17,6 +17,7 @@
 */
 package org.apache.abdera.security.util;
 
+import java.io.Serializable;
 import java.math.BigInteger;
 import java.security.AlgorithmParameterGenerator;
 import java.security.AlgorithmParameters;
@@ -62,8 +63,10 @@
  * 
  */
 public class DHContext 
-  implements Cloneable {
+  implements Cloneable, 
+             Serializable {
 
+  private static final long serialVersionUID = 9145945368596071015L;
   BigInteger p = null, g = null;
   int l = 0;
   private KeyPair keyPair;
@@ -97,9 +100,6 @@
     buf.append("g=");
     buf.append(g.toString());
     buf.append(", ");
-    buf.append("l=");
-    buf.append(l);
-    buf.append(", ");
     buf.append("k=");
     buf.append(Base64.encode(keyPair.getPublic().getEncoded()));
     return buf.toString();
@@ -147,8 +147,6 @@
         p = new BigInteger(value);
       else if (name.equalsIgnoreCase("g"))
         g = new BigInteger(value);
-      else if (name.equalsIgnoreCase("l"))
-        l = Integer.parseInt(value);
       else if (name.equalsIgnoreCase("k"))
         key = Base64.decode(value);
     }



Mime
View raw message