gnu.crypto.key.srp6
Class SRPPrivateKey
- Key, PrivateKey, Serializable
public class SRPPrivateKey
implements PrivateKey
SRPPrivateKey(BigInteger N, BigInteger g, BigInteger x) - Public constructor for use from outside this package.
|
SRPPrivateKey(BigInteger N, BigInteger g, BigInteger x, BigInteger v) - Public constructor for use from outside this package.
|
SRPPrivateKey(BigInteger[] params) - Default constructor.
|
boolean | equals(Object obj) - Returns
true if the designated object is an instance of
SRPPrivateKey and has the same SRP parameter values as this
one.
|
byte[] | getEncoded(int format) - Returns the encoded form of this private key according to the
designated format.
|
BigInteger | getV() - Returns the user's verifier as a
BigInteger .
|
BigInteger | getX() - Returns the private exponent of the key as a
BigInteger .
|
static SRPPrivateKey | valueOf(byte[] k) - A class method that takes the output of the
encodePrivateKey()
method of an SRP keypair codec object (an instance implementing
IKeyPairCodec for DSS keys, and re-constructs an instance of this
object.
|
SRPPrivateKey
public SRPPrivateKey(BigInteger N,
BigInteger g,
BigInteger x)
Public constructor for use from outside this package.
N
- the public shared modulus.g
- the generator.x
- the private exponent of the ephemeral key.
SRPPrivateKey
public SRPPrivateKey(BigInteger N,
BigInteger g,
BigInteger x,
BigInteger v)
Public constructor for use from outside this package.
N
- the public shared modulus.g
- the generator.x
- the private exponent of the ephemeral key.v
- the user's verifier value (for the server side only).
SRPPrivateKey
(package private) SRPPrivateKey(BigInteger[] params)
Default constructor. Assumes N and g are already validated.
params
- an array of either 3 or 4 values representing N, g, and
either v and X for the server, or just X for the client. Those values
represent the following:
- v (server side): the user's verifier.
- X (both sides): the server's or client's ephemeral private exponent.
equals
public boolean equals(Object obj)
Returns true
if the designated object is an instance of
SRPPrivateKey
and has the same SRP parameter values as this
one.
- equals in interface SRPKey
obj
- the other non-null SRP key to compare to.
true
if the designated object is of the same type and
value as this one.
getEncoded
public byte[] getEncoded(int format)
Returns the encoded form of this private key according to the
designated format.
- getEncoded in interface SRPKey
format
- the desired format identifier of the resulting encoding.
- the byte sequence encoding this key according to the designated
format.
getV
public BigInteger getV()
Returns the user's verifier as a BigInteger
.
- the user's verifier as a
BigInteger
if this is an SRP
private key of a Host, or null
if this is a private SRP key
for a User.
getX
public BigInteger getX()
Returns the private exponent of the key as a BigInteger
.
- the private exponent of the key as a
BigInteger
.
valueOf
public static SRPPrivateKey valueOf(byte[] k)
A class method that takes the output of the
encodePrivateKey()
method of an SRP keypair codec object (an instance implementing
IKeyPairCodec
for DSS keys, and re-constructs an instance of this
object.
k
- the contents of a previously encoded instance of this object.
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.