cryptix.provider.rsa
Class RawRSAPublicKey
- CryptixRSAPublicKey, PublicKey, RSAKey
public class RawRSAPublicKey
A class representing a RAW-encoded RSA public key.
The encoding consists of the following, in order:
- the public exponent e,
- 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.7 $
- Raif S. Naffah
- David Hopwood
- Cryptix 2.2.2
RawRSAPublicKey(BigInteger n) - Constructs a raw RSA public key given the public modulus and using
the Fermat prime F4 (value 0x10001) as the exponent.
|
RawRSAPublicKey(BigInteger n, BigInteger e) - Constructs a raw RSA public key given the public modulus n,
and the public exponent e.
|
RawRSAPublicKey(InputStream is) - Constructs a raw RSA public key from data read from an InputStream,
encoded as described above.
|
byte[] | getEncoded() - Returns an encoding of the key as a byte array, as described
above.
|
String | getFormat() - Returns the encoding format name, for this class always "RAW".
|
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.
n
- the public modulus
RawRSAPublicKey
public RawRSAPublicKey(BigInteger n,
BigInteger e)
Constructs a raw RSA public key given the public modulus n,
and the public exponent e.
n
- the public moduluse
- the public exponent
RawRSAPublicKey
public RawRSAPublicKey(InputStream is)
throws IOException
Constructs a raw RSA public key from data read from an InputStream,
encoded as described
above.
is
- the input stream from which data is parsed.
getEncoded()
getEncoded
public byte[] getEncoded()
Returns an encoding of the key as a byte array, as described
above.
- the encoded byte array, or null if an error occurred.
getFormat
public String getFormat()
Returns the encoding format name, for this class always "RAW".
- the encoding format name for this key, "RAW".