cryptix.provider.rsa

Class BaseRSAPublicKey

Implemented Interfaces:
CryptixRSAPublicKey, PublicKey, RSAKey
Known Direct Subclasses:
RawRSAPublicKey

public abstract class BaseRSAPublicKey
extends java.lang.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 $

Authors:
Raif S. Naffah
David Hopwood
Since:
Cryptix 2.2.2

Constructor Summary

BaseRSAPublicKey()
Constructs an RSA private key, without setting the parameters.

Method Summary

String
getAlgorithm()
Returns the name of the algorithm, for this class always "RSA".
BigInteger
getExponent()
Returns the public exponent e.
BigInteger
getModulus()
Returns the public modulus n.
protected void
setRsaParams(BigInteger n, BigInteger e)
Sets the RSA parameters n and e.
String
toString()
Returns a string representation of this key.

Constructor Details

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 Details

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.
Specified by:
getExponent in interface RSAKey
Returns:
the public exponent e.

getModulus

public BigInteger getModulus()
Returns the public modulus n.
Specified by:
getModulus in interface RSAKey
Returns:
the public modulus n.

setRsaParams

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

toString

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