Name

RSAKey

Synopsis

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 jxta.security.publickey.RSAPublicKey, jxta.security.publickey.RSAPrivateKey {
// Public Constructors
   public RSAKey(byte type, short len);  
// Public Instance Methods
   public boolean RSAEquals(jxta.security.impl.publickey.RSAKey k, byte type);
// Methods Implementing RSAPublicKey
   public boolean equals(jxta.security.publickey.RSAPublicKey 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 jxta.security.exceptions.CryptoException;
   public void setPublicExponent(byte[ ] exp, int offset, int len) throws jxta.security.exceptions.CryptoException;
// Methods Implementing Key
   public void clearKey ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.