gnu.crypto.key.srp6
Class SRPPublicKey
- Key, PublicKey, Serializable
public class SRPPublicKey
implements PublicKey
Version:
SRPPublicKey(BigInteger N, BigInteger g, BigInteger Y) - Public constructor for use from outside this package.
|
SRPPublicKey(BigInteger[] params) - Default constructor.
|
boolean | equals(Object obj) - Returns
true if the designated object is an instance of
SRPPublicKey and has the same SRP parameter values as this one.
|
byte[] | getEncoded(int format) - Returns the encoded form of this public key according to the designated
format.
|
BigInteger | getY() - Returns the public exponent of the key as a
BigInteger .
|
static SRPPublicKey | valueOf(byte[] k) - A class method that takes the output of the
encodePublicKey()
method of an SRP keypair codec object (an instance implementing
IKeyPairCodec for SRP keys, and re-constructs an instance of this
object.
|
SRPPublicKey
public SRPPublicKey(BigInteger N,
BigInteger g,
BigInteger Y)
Public constructor for use from outside this package.
N
- the public shared modulus.g
- the generator.Y
- the public exponent of the ephemeral key.
SRPPublicKey
(package private) SRPPublicKey(BigInteger[] params)
Default constructor. Assumes that N and g are already validated.
params
- an array of 3 values representing N, g and Y; the latter
being the client's or server's public exponent.
equals
public boolean equals(Object obj)
Returns true
if the designated object is an instance of
SRPPublicKey
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 public 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.
getY
public BigInteger getY()
Returns the public exponent of the key as a BigInteger
.
- the public exponent of the key as a
BigInteger
.
valueOf
public static SRPPublicKey valueOf(byte[] k)
A class method that takes the output of the
encodePublicKey()
method of an SRP keypair codec object (an instance implementing
IKeyPairCodec
for SRP 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.