Author: kryptos
Date: 2007-07-21 19:13:15 +0000 (Sat, 21 Jul 2007)
New Revision: 14246

Added:
   branches/freenet-jfk/src/freenet/crypt/crypto_Random/HKrGenerator.java
Log:
Transient key for authentication

Added: branches/freenet-jfk/src/freenet/crypt/crypto_Random/HKrGenerator.java
===================================================================
--- branches/freenet-jfk/src/freenet/crypt/crypto_Random/HKrGenerator.java      
                        (rev 0)
+++ branches/freenet-jfk/src/freenet/crypt/crypto_Random/HKrGenerator.java      
2007-07-21 19:13:15 UTC (rev 14246)
@@ -0,0 +1,17 @@
+import java.io.*;
+import freenet.node.*;
+public class HKrGenerator{
+    private byte[] hashKey;
+    public HKrGenerator(){
+        hashKey = new byte[20];
+    }
+    public HKrGenerator(int size){
+        hashKey = new byte[size];
+    }
+
+    public byte[] getNewHKr() throws Exception{
+        node.random.nextBytes(hashKey);
+        return hashKey;
+    }
+}
+


Reply via email to