All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.provider.rsa.RawRSAPublicKey

java.lang.Object
   |
   +----cryptix.provider.rsa.BaseRSAPublicKey
           |
           +----cryptix.provider.rsa.RawRSAPublicKey

public class RawRSAPublicKey
extends BaseRSAPublicKey
A class representing a RAW-encoded RSA public key.

The encoding consists of the following, in order:

  1. the public exponent e,
  2. the modulus n.

Each integer is represented as follows:

    Byte    Length
    offset  (bytes)   Meaning
    0       2         The length in bits of this BigInteger (MSB first);
    2       variable  The BigInteger's magnitude with no leading zeroes,
                      again MSB first.
 

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.5 $

Author:
Raif S. Naffah, David Hopwood

Constructor Index

 o RawRSAPublicKey(BigInteger)
Constructs a raw RSA public key given the public modulus and using the Fermat prime F4 (value 0x10001) as the exponent.
 o RawRSAPublicKey(BigInteger, BigInteger)
Constructs a raw RSA public key given the public modulus n, and the public exponent e.
 o RawRSAPublicKey(InputStream)
Constructs a raw RSA public key from data read from an InputStream, encoded as described above.

Method Index

 o getEncoded()
Returns an encoding of the key as a byte array, as described above.
 o getFormat()
Returns the encoding format name, for this class always "RAW".

Constructors

 o RawRSAPublicKey
 public RawRSAPublicKey(BigInteger n,
                        BigInteger e)
Constructs a raw RSA public key given the public modulus n, and the public exponent e.

Parameters:
n - the public modulus
e - the public exponent
 o RawRSAPublicKey
 public RawRSAPublicKey(BigInteger n)
Constructs a raw RSA public key given the public modulus and using the Fermat prime F4 (value 0x10001) as the exponent.

Parameters:
n - the public modulus
 o RawRSAPublicKey
 public RawRSAPublicKey(InputStream is) throws IOException
Constructs a raw RSA public key from data read from an InputStream, encoded as described above.

Parameters:
is - the input stream from which data is parsed.
Throws: IOException
if any I/O error occurs.
See Also:
getEncoded

Methods

 o getFormat
 public String getFormat()
Returns the encoding format name, for this class always "RAW".

Returns:
the encoding format name for this key, "RAW".
Overrides:
getFormat in class BaseRSAPublicKey
 o getEncoded
 public byte[] getEncoded()
Returns an encoding of the key as a byte array, as described above.

Returns:
the encoded byte array, or null if an error occurred.
Overrides:
getEncoded in class BaseRSAPublicKey

All Packages  Class Hierarchy  This Package  Previous  Next  Index