cryptix.provider.rsa

Class BaseRSAPublicKey

public abstract class BaseRSAPublicKey extends Object implements CryptixRSAPublicKey

An abstract class representing an RSA public key.

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.6 $

Since: Cryptix 2.2.2

Author: Raif S. Naffah David Hopwood

Constructor Summary
protected BaseRSAPublicKey()
Constructs an RSA private key, without setting the parameters.
Method Summary
StringgetAlgorithm()
Returns the name of the algorithm, for this class always "RSA".
BigIntegergetExponent()
Returns the public exponent e.
BigIntegergetModulus()
Returns the public modulus n.
protected voidsetRsaParams(BigInteger n, BigInteger e)
Sets the RSA parameters n and e.
StringtoString()
Returns a string representation of this key.

Constructor Detail

BaseRSAPublicKey

protected BaseRSAPublicKey()
Constructs an RSA private key, without setting the parameters. Subclasses should call one of the setRsaParams methods in each of their constructors.

Method Detail

getAlgorithm

public String getAlgorithm()
Returns the name of the algorithm, for this class always "RSA".

Returns: the name of the algorithm, "RSA".

getExponent

public BigInteger getExponent()
Returns the public exponent e.

Returns: the public exponent e.

getModulus

public BigInteger getModulus()
Returns the public modulus n.

Returns: the public modulus n.

setRsaParams

protected void setRsaParams(BigInteger n, BigInteger e)
Sets the RSA parameters n and e.

Throws: NullPointerException if n == null || e == null

toString

public String toString()
Returns a string representation of this key.

Returns: a string representation of this key.