[Webfunds-devel] WebFunds on JDK 1.3: success!

Edwin Woudt edwin@woudt.nl
Fri, 18 Aug 2000 04:47:22 +0000


Using the new cryptix 3.2 snapshot, I managed to get WebFunds up and
running on JDK 1.3 with minimal changes in webfunds/sox/Crypto.java (diff
attached below)

To get this to work, you need to download the snapshot at:
  http://cvs.cryptix.org/~edwin/cryptix3/cryptix32-20000818-snap.zip
and replace Cryptix.jar in webfunds with cryptix32.jar in that snapshot.

After these changes it works (for me at least) on JDK 1.1, 1.2 and 1.3.


Edwin


Diff: (slightly edited to prevent wrapping, so not directly useable as a 
patch)


Index: java/webfunds/sox/Crypto.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Crypto.java,v
retrieving revision 1.48
diff -u -r1.48 Crypto.java
--- Crypto.java 2000/08/11 20:43:21     1.48
+++ Crypto.java 2000/08/18 02:33:28
@@ -420,8 +420,8 @@
         throws KeyException
     {
         try {
-            java.security.Cipher rsa =
-                java.security.Cipher.getInstance(pk_alg);
+            xjava.security.Cipher rsa =
+                xjava.security.Cipher.getInstance(pk_alg);
             pk = toCryptixKey(pk);
             rsa.initEncrypt(pk);

@@ -535,7 +535,8 @@
             //
             // Decrypt the key
             //
-            java.security.Cipher rsa =
-                java.security.Cipher.getInstance(pk_alg);
+            xjava.security.Cipher rsa =
+                xjava.security.Cipher.getInstance(pk_alg);
             rsa.initDecrypt(pk);

             int pktlen = rsa.getCiphertextBlockSize() + 1;
@@ -598,7 +599,8 @@
         pk = translateKey(pk);
         try {
             // Only using cipher to get packet length ...
-            java.security.Cipher rsa =
-                java.security.Cipher.getInstance(pk_alg);
+            xjava.security.Cipher rsa =
+                xjava.security.Cipher.getInstance(pk_alg);
             rsa.initDecrypt(pk);
             int pktlen = rsa.getCiphertextBlockSize();
             return decrypt(key, data, offset+pktlen, len-pktlen);