Class au.net.aba.crypto.provider.RSAPublicKey
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.crypto.provider.RSAPublicKey

java.lang.Object
   |
   +----au.net.aba.crypto.provider.RSAPublicKey

public class RSAPublicKey
extends Object
implements Key, PublicKey
A class for ABA RSA public keys.

Variable Index

 o exponent
The exponent component of the two part key that is required by the RSA algorithm.
 o ident
 o modulus
The modulus component of the two part key that is required by the RSA algorithm.

Constructor Index

 o RSAPublicKey()
Construct an empty RSAPublicKey.
 o RSAPublicKey(BigInteger, BigInteger)
Construct an RSAPublicKey from two integral components.
 o RSAPublicKey(KeySpec)

Method Index

 o decrypt(BigInteger)
Decrypt a data block with this key.
 o encrypt(BigInteger)
Encrypt a data block with this key.
 o getAlgorithm()
return the algorithm for this key.
 o getEncoded()
Return an encoded representation for this key.
 o getFormat()
return the format this key is in.
 o setFields(BigInteger, BigInteger)
This should have been the constructor above, but as we can't chain constructors other than as the first call (and we can't do that at line 105), we're reduced to this.
 o significantBytes()
Determine the number of significant bytes in the key.
 o toString()
Generate a String representation of this key.

Variables

 o ident
  public final static String ident
 o exponent
  protected BigInteger exponent
The exponent component of the two part key that is required by the RSA algorithm.
 o modulus
  protected BigInteger modulus
The modulus component of the two part key that is required by the RSA algorithm.

Constructors

 o RSAPublicKey
  public RSAPublicKey()
Construct an empty RSAPublicKey.
 o RSAPublicKey
  public RSAPublicKey(KeySpec keySpec)
 o RSAPublicKey
  public RSAPublicKey(BigInteger modulus,
                      BigInteger exponent)
Construct an RSAPublicKey from two integral components.
Parameters:
modulus - The modulus value.
exponent - The exponent value.

Methods

 o setFields
  protected void setFields(BigInteger modulus,
                           BigInteger exponent)
This should have been the constructor above, but as we can't chain constructors other than as the first call (and we can't do that at line 105), we're reduced to this.
Parameters:
modulus - The modulus value.
exponent - The exponent value.
 o getAlgorithm
  public String getAlgorithm()
return the algorithm for this key.
 o getFormat
  public String getFormat()
return the format this key is in.
 o getEncoded
  public byte[] getEncoded()
Return an encoded representation for this key. Returns a byte array containing the string as a dotted hex string.
See Also:
toString
 o significantBytes
  public int significantBytes()
Determine the number of significant bytes in the key. Note: this assumes our keys will always be positive numbers.
Returns:
The number of bytes.
 o toString
  public String toString()
Generate a String representation of this key.
Returns:
The key as a string.
Overrides:
toString in class Object
 o encrypt
  protected BigInteger encrypt(BigInteger plainText)
Encrypt a data block with this key.
Parameters:
plainText - The plain text block to encrypt.
Returns:
The encrypted data.
 o decrypt
  protected BigInteger decrypt(BigInteger cipherText)
Decrypt a data block with this key.
Parameters:
data - The cipher text block to decrypt.
Returns:
The decrypted data.

All Packages  Class Hierarchy  This Package  Previous  Next  Index