Examples of SRP6ClientSession


Examples of com.nimbusds.srp6.SRP6ClientSession

 
    // Step 1
 
    System.out.println("Client session step 1");
   
    SRP6ClientSession client = new SRP6ClientSession();
   
    User user = getUser("\t");
    client.step1(user.I, user.P);
 
    System.out.println();
   
   
    // Step 2
   
    System.out.println("Client session step 2");
   
    SRP6CryptoParams config = getConfig("\t");
   
    System.out.print("\tEnter salt 's' (hex): ");
    BigInteger s = readBigInteger();
    System.out.println();
   
    System.out.print("\tEnter public server value 'B' (hex): ");
    BigInteger B = readBigInteger();
    System.out.println();
   
    SRP6ClientCredentials cred;
   
    try {
      cred = client.step2(config, s, B);
     
    } catch (SRP6Exception e) {
     
      System.out.println(e.getMessage());
      return;
    }
   
    System.out.println("\tComputed public value 'A' (hex): " + BigIntegerUtils.toHex(cred.A));
    System.out.println("\tComputed evidence message 'M1' (hex): " + BigIntegerUtils.toHex(cred.M1));
    System.out.println();
   
   
    // Step 3
   
    System.out.println("Client session step 3");
   
    System.out.print("\tEnter server evidence message 'M2' (hex): ");
   
    BigInteger M2 = readBigInteger();
   
    try {
      client.step3(M2);
     
    } catch (SRP6Exception e) {
   
      System.out.println(e.getMessage());
      return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.