gnu.crypto.key.rsa

Class GnuRSAKey

Implemented Interfaces:
Key, RSAKey
Known Direct Subclasses:
GnuRSAPrivateKey, GnuRSAPublicKey

public abstract class GnuRSAKey
extends java.lang.Object
implements Key, RSAKey

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

Version:
$Revision: 1.3 $

Constructor Summary

GnuRSAKey(BigInteger n, BigInteger e)
Trivial protected constructor.

Method Summary

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.
String
getAlgorithm()
BigInteger
getE()
Same as getPublicExponent().
byte[]
getEncoded()
Deprecated. see getEncoded(int).
byte[]
getEncoded(int format)
String
getFormat()
BigInteger
getModulus()
BigInteger
getN()
Returns the modulus n.
BigInteger
getPublicExponent()
Returns the public exponent e.

Constructor Details

GnuRSAKey

protected GnuRSAKey(BigInteger n,
                    BigInteger e)
Trivial protected constructor.

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

Method Details

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()

Returns:
the public exponent e.


getEncoded

public byte[] getEncoded()

Deprecated. see getEncoded(int).


getEncoded

public 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.