/[storm]/storm/org/nongnu/storm/pointers/SetPointer.java
ViewVC logotype

Diff of /storm/org/nongnu/storm/pointers/SetPointer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by benja, Fri May 9 16:46:25 2003 UTC revision 1.5 by benja, Thu May 22 00:14:08 2003 UTC
# Line 35  import java.security.*; Line 35  import java.security.*;
35    
36  public class SetPointer {  public class SetPointer {
37    
38      /** Usage is SetPointer keyfile [pool [pointer] target].      public static KeyPair readKeyPair(File keyFile) throws Exception {
      *  If no pointer is given, a new one is generated.  
      *  If the key file doesn't exist, it's created.  
      */  
     public static void main(String[] argv) throws Exception {  
         System.out.println("Please wait, may need to initialize random number generator...");  
   
         File keyFile = new File(argv[0]);  
39          KeyPair keys;          KeyPair keys;
40    
41          if(keyFile.exists()) {          if(keyFile.exists()) {
# Line 59  public class SetPointer { Line 52  public class SetPointer {
52              out.close();              out.close();
53          }          }
54    
55            return keys;
56        }
57    
58        /** Usage is SetPointer keyfile [pool [pointer] target].
59         *  If no pointer is given, a new one is generated.
60         *  If the key file doesn't exist, it's created.
61         */
62        public static void main(String[] argv) throws Exception {
63            System.out.println("Please wait, may need to initialize random number generator...");
64    
65            File keyFile = new File(argv[0]);
66            KeyPair keys = readKeyPair(keyFile);
67    
68          if(argv.length == 1) {          if(argv.length == 1) {
69              PointerId pointer = new PointerId(keys.getPublic());              PointerId pointer = new PointerId(keys.getPublic());
70              System.out.println("Pointer created:");              System.out.println("Pointer created:");

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26