[Webfunds-commits] java/webfunds/sox RegisterRequest.java Utils.java
Ian Grigg
iang@cypherpunks.ai
Wed, 11 Apr 2001 15:16:51 -0400 (AST)
iang 01/04/11 15:16:51
Modified: webfunds/sox RegisterRequest.java Utils.java
Log:
added an Utils.exampleKeyPair call, example public keys can be
extracted from that.
Revision Changes Path
1.18 +3 -3 java/webfunds/sox/RegisterRequest.java
Index: RegisterRequest.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/RegisterRequest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- RegisterRequest.java 2000/09/24 23:32:04 1.17
+++ RegisterRequest.java 2001/04/11 19:16:50 1.18
@@ -1,4 +1,4 @@
-/* $Id: RegisterRequest.java,v 1.17 2000/09/24 23:32:04 iang Exp $
+/* $Id: RegisterRequest.java,v 1.18 2001/04/11 19:16:50 iang Exp $
*
* Copyright (c) Systemics Inc. 1995-2000 on behalf of
* The WebFunds Development Team. All Rights Reserved.
@@ -15,7 +15,7 @@
* A Request class that registers a client key with an issuer,
* by means of the "Register" request
*
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*/
public class RegisterRequest
extends Request
@@ -202,7 +202,7 @@
int len = b[0] & 0x07;
String rid = webfunds.utils.Hex.data2hex(Utils.exampleData(len));
- PublicKey pk = Utils.examplePublicKey();
+ PublicKey pk = Utils.exampleKeyPair().getPublic();
AccountId id = null;
try {
1.23 +5 -8 java/webfunds/sox/Utils.java
Index: Utils.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Utils.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Utils.java 2001/03/20 23:15:46 1.22
+++ Utils.java 2001/04/11 19:16:50 1.23
@@ -1,5 +1,5 @@
/*
- * $Id: Utils.java,v 1.22 2001/03/20 23:15:46 iang Exp $
+ * $Id: Utils.java,v 1.23 2001/04/11 19:16:50 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -185,14 +185,11 @@
}
/**
- * Don't try and do public key on this!
+ * Don't try and do public key using this, it is rubbish!
*/
- public static PublicKey examplePublicKey() {
- throw new RuntimeException("No crypto here!");
- }
-
- public static PrivateKey examplePrivateKey() {
- throw new RuntimeException("No crypto here!");
+ public static KeyPair exampleKeyPair()
+ {
+ return Crypto.generateKeys(384);
}
/**