UPDATED: See jPPPv3.0.1

I have updated my earlier implementation for PPPv3. In addition, I modified the PPPEngine object to behave in an easier to manage way. Here is my new java doc, along with an example driver.

Download

 1: Scanner in = new Scanner(System.in);
 2: System.out.print("Password: ");
 3: String password = in.next();
 4: String sequencekey = PPPengine.findSequenceKey(password);
 5: PPPengine card1 = new PPPengine(sequencekey);
 6: System.out.println("Code 1: "+card1.makePasscode ());
 7: card1.advanceToNextPasscode();
 8: System.out.println("Code 2: "+card1.makePasscode ());

Class PPPengine

java.lang.Object PPPengine

public class PPPengine
extends java.lang.Object

Main class for PPP password calculations.


Constructor Summary
PPPengine(java.lang.String sequenceKeyIn)

          Initiates the PPP card object.

PPPengine(java.lang.String sequenceKeyIn, int cardNumberIn, int columnIn, int rowIn)

          

  

Method Summary
void advanceToNextPasscode()

          Advances the current object to the next passcode.

static java.lang.String findSequenceKey(java.lang.String passphrase)

          Creates 64-bit sequence key from passphrase using SHA-256.

java.lang.String makePasscode()

          Generates the passcode for the current object’s state.

static void setAlphabet(java.lang.String alphabetIn)

          Sets the character set used by the engine.

static void setLength(int lengthIn)

          Sets the passcode length used by the system.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

  

Constructor Detail

PPPengine

public PPPengine(java.lang.String sequenceKeyIn)
Initiates the PPP card object. Use this to create a virtual replacement for a set printed PPP cards.

Parameters:
sequenceKeyIn – 64 Character key used to generate card

PPPengine

public PPPengine(java.lang.String sequenceKeyIn, int cardNumberIn, int columnIn, int rowIn)
Parameters:
sequenceKeyIn – 64 Character key used to generate card
cardNumberIn – Starting PPP card
columnIn – Starting column
rowIn – Starting row

Method Detail

findSequenceKey

 public static java.lang.String findSequenceKey(java.lang.String passphrase)
Creates 64-bit sequence key from passphrase using SHA-256.

Parameters:
passphrase – String passphrase to be converted
Returns:
String 64-bit sequence key

setAlphabet

public static void setAlphabet(java.lang.String alphabetIn)
Sets the character set used by the engine.

Parameters:
alphabetIn – String of characters

setLength

public static void setLength(int lengthIn)
Sets the passcode length used by the system.

Parameters:
lengthIn – Number of characters in final passcode

advanceToNextPasscode

public void advanceToNextPasscode()
Advances the current object to the next passcode.


makePasscode

public java.lang.String makePasscode()
Generates the passcode for the current object’s state.

Returns:
String of length characters that is the passcode.
Throws:
java.lang.IllegalArgumentException