Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.pk
Class RSAPublicKeyImpl  view RSAPublicKeyImpl download RSAPublicKeyImpl.java

java.lang.Object
  extended bycryptix.jce.provider.pk.RSAPublicKeyImpl
All Implemented Interfaces:
java.security.Key, java.security.PublicKey, java.security.interfaces.RSAKey, java.security.interfaces.RSAPublicKey, java.io.Serializable

public final class RSAPublicKeyImpl
extends java.lang.Object
implements java.security.interfaces.RSAPublicKey

RSAPublicKey implementation that encodes itself in X.509 format.

 X.509 encoding is DER-encoded ASN.1:

 SEQUENCE
   AlgorithId  id
   BIT_STRING  key

 where key is the DER-encoding of:

 SEQUENCE
   INTEGER  modulus
   INTEGER  exponent
 

Version:
$Revision: 1.3 $

Field Summary
private  java.math.BigInteger e
          Modulus and public exponent.
private  java.math.BigInteger n
          Modulus and public exponent.
 
Fields inherited from interface java.security.interfaces.RSAPublicKey
serialVersionUID
 
Constructor Summary
RSAPublicKeyImpl(java.math.BigInteger n, java.math.BigInteger e)
           
 
Method Summary
 java.lang.String getAlgorithm()
          This method returns the name of the algorithm for this key.
 byte[] getEncoded()
          Returns a byte[] containing the X.509 encoded RSAPublicKey.
 java.lang.String getFormat()
          The string "X.509".
 java.math.BigInteger getModulus()
          Generates a modulus.
 java.math.BigInteger getPublicExponent()
          Returns the public exponent value for this key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

private final java.math.BigInteger n
Modulus and public exponent.


e

private final java.math.BigInteger e
Modulus and public exponent.

Constructor Detail

RSAPublicKeyImpl

public RSAPublicKeyImpl(java.math.BigInteger n,
                        java.math.BigInteger e)
Method Detail

getModulus

public java.math.BigInteger getModulus()
Description copied from interface: java.security.interfaces.RSAKey
Generates a modulus.

Specified by:
getModulus in interface java.security.interfaces.RSAKey

getPublicExponent

public java.math.BigInteger getPublicExponent()
Description copied from interface: java.security.interfaces.RSAPublicKey
Returns the public exponent value for this key

Specified by:
getPublicExponent in interface java.security.interfaces.RSAPublicKey

getAlgorithm

public java.lang.String getAlgorithm()
Description copied from interface: java.security.Key
This method returns the name of the algorithm for this key. This is a String such as "RSA".

Specified by:
getAlgorithm in interface java.security.Key

getFormat

public java.lang.String getFormat()
The string "X.509".

Specified by:
getFormat in interface java.security.Key

getEncoded

public byte[] getEncoded()
Returns a byte[] containing the X.509 encoded RSAPublicKey.

Specified by:
getEncoded in interface java.security.Key