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

Jeroen C. van Gelderen gelderen@cypherpunks.ai
Tue, 29 Aug 2000 22:12:41 -0400 (AST)


gelderen    00/08/29 22:12:41

  Modified:    webfunds/sox Utils.java
  Log:
  Lobotomize some example functions that have their tentacles into crypto.

Revision  Changes    Path
1.19      +7 -49     java/webfunds/sox/Utils.java

Index: Utils.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Utils.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Utils.java	2000/08/17 18:17:46	1.18
+++ Utils.java	2000/08/30 02:12:41	1.19
@@ -1,5 +1,5 @@
 /*
- * $Id: Utils.java,v 1.18 2000/08/17 18:17:46 iang Exp $
+ * $Id: Utils.java,v 1.19 2000/08/30 02:12:41 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -183,53 +183,11 @@
     /**
      * Don't try and do public key on this!
      */
-    public static PublicKey examplePublicKey()
-    {
-         byte[] nData = exampleData(50);
-         nData[0] &= 0x7F;                 // positive!
-         byte[] risky = "NSABackdoorKey".getBytes();
-         for (int i = 0; i < risky.length; i++)
-             nData[i+4] = risky[i];
-            
-         byte[] eData = exampleData(2);
-         eData[0] &= 0x7F;                 // positive!
-
-         java.math.BigInteger n;
-         java.math.BigInteger e;
-         try {
-             n = new java.math.BigInteger(nData);
-             e = new java.math.BigInteger(eData);
-         } catch (NumberFormatException ex) {
-             throw new RuntimeException(ex.getMessage());
-         }
-
-         PublicKey pk;
-         pk = (PublicKey)new cryptix.provider.rsa.RawRSAPublicKey(n, e);
-         return pk;
-    }
-
-    // Hmm, this doesn't actually work, cryptix barfs.
-    public static PrivateKey examplePrivateKey()
-    {
-         byte[] dData = exampleData(50);
-         dData[0] &= 0x7F;                 // positive!
-         byte[] pData = "SubliminalChannel".getBytes();
-         byte[] qData = exampleData(20);
-         qData[0] &= 0x7F;                 // positive!
-         byte[] uData = "BXAApproved".getBytes();
-            
-         java.math.BigInteger d, p, q, u;
-         try {
-             d = new java.math.BigInteger(dData);
-             p = new java.math.BigInteger(pData);
-             q = new java.math.BigInteger(qData);
-             u = new java.math.BigInteger(uData);
-         } catch (NumberFormatException ex) {
-             throw new RuntimeException(ex.getMessage());
-         }
-
-         PrivateKey pk;
-         pk = (PrivateKey)new cryptix.provider.rsa.RawRSAPrivateKey(d, p, q, u);
-         return pk;
+    public static PublicKey examplePublicKey() {
+         throw new RuntimeException("No crypto here!");
+    }
+
+    public static PrivateKey examplePrivateKey() {
+         throw new RuntimeException("No crypto here!");
     }
 }