public abstract class SRP6Tool extends Object
Modifier and Type | Field and Description |
---|---|
protected BufferedReader |
console
Buffered console input reader.
|
Constructor and Description |
---|
SRP6Tool()
Creates a new SRP-6a command-line tool.
|
Modifier and Type | Method and Description |
---|---|
SRP6CryptoParams |
getConfig(String prefix)
Interactive command-line session to select the SRP-6a crypto
parameters.
|
BigInteger |
readBigInteger()
Reads a big integer (hex-encoded) from the command-line.
|
String |
readInput()
Reads user input from the command-line.
|
String |
readInput(String def)
Reads user input from the command-line.
|
abstract void |
run()
Runs the SRP-6a command-line tool.
|
protected BufferedReader console
public SRP6Tool() throws IOException
IOException
- On console I/O exception.public String readInput(String def) throws IOException
def
- The default string to return if nothing was entered by the
user, null
if user input is mandatory.IOException
- On missing input or console I/O exception.public String readInput() throws IOException
IOException
- On missing input or console I/O exception.public BigInteger readBigInteger() throws IOException
IOException
- On missing input, bad hex format or console I/O
exception.public SRP6CryptoParams getConfig(String prefix) throws IOException
prefix
- String to prepend to the console output.IOException
- On a console I/O exception.public abstract void run() throws IOException
IOException
- On missing / bad input or console I/O exception.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.