gnu.crypto.key.rsa

Class GnuRSAKey

public abstract class GnuRSAKey extends Object implements Key, RSAKey

A base asbtract class for both public and private RSA keys.

Version: $Revision: 1.4 $

Constructor Summary
protected GnuRSAKey(BigInteger n, BigInteger e)

Trivial protected constructor.

Method Summary
booleanequals(Object obj)

Returns true if the designated object is an instance of RSAKey and has the same RSA parameter values as this one.

StringgetAlgorithm()
BigIntegergetE()
byte[]getEncoded()
abstract byte[]getEncoded(int format)
StringgetFormat()
BigIntegergetModulus()
BigIntegergetN()

Returns the modulus n.

BigIntegergetPublicExponent()

Returns the public exponent e.

Constructor Detail

GnuRSAKey

protected GnuRSAKey(BigInteger n, BigInteger e)

Trivial protected constructor.

Parameters: n the public modulus n. e the public exponent e.

Method Detail

equals

public boolean equals(Object obj)

Returns true if the designated object is an instance of RSAKey and has the same RSA parameter values as this one.

Parameters: obj the other non-null RSA key to compare to.

Returns: true if the designated object is of the same type and value as this one.

getAlgorithm

public String getAlgorithm()

getE

public BigInteger getE()

Same as getPublicExponent.

Returns: the public exponent e.

getEncoded

public byte[] getEncoded()

Deprecated: see getEncoded(int).

getEncoded

public abstract byte[] getEncoded(int format)

getFormat

public String getFormat()

getModulus

public BigInteger getModulus()

getN

public BigInteger getN()

Returns the modulus n.

Returns: the modulus n.

getPublicExponent

public BigInteger getPublicExponent()

Returns the public exponent e.

Returns: the public exponent e.

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.