This class provides the implementation of an RSA public/private key pair. Instances of this class are returned by the KeyBuilder class. Pass an instance of this class to the JxtaCryptoSuite class when you need to support RSA-based algorithms; the algorithms returned by that suite will use the keys encoded in this object.

You create the JxtaCryptoSuite object before initializing this key and then obtain the public key algorithm implementation from the suite. You must then use the setPublicKey( ) and setPrivateKey( ) methods of that interface to initialize the RSA key.

Because it’s used to create the JxtaCryptoSuite object, this class is commonly used.

public final class RSAKey implements, {
// Public Constructors
   public RSAKey(byte type, short len);  
// Public Instance Methods
   public boolean RSAEquals( k, byte type);
// Methods Implementing RSAPublicKey
   public boolean equals( key);
   public int getModulus(byte[ ] mod, int offset);  
   public int getModulusLength();  
   public int getPublicExponent(byte[ ] exp, int offset); 
   public int getPublicExponentLength();  
   public void setModulus(byte[ ] mod, int offset, int len) throws;
   public void setPublicExponent(byte[ ] exp, int offset, int len) throws;
// Methods Implementing Key
   public void clearKey ...

Get JXTA in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.