Construction of RSA keys ( very urgent )

I have a byte array which contains the public modulus and public exponent (first 2 bytes specifies the length of the public exponent, followed by public exponent, the next two bytes after public exponent specifies the length of public modulus and followed by the public modulus). I have to construct the RSA keys from the array as described above. I will be very thankfull for a quick reply (very urgent).

[412 byte] By [buddy_boya] at [2007-11-27 11:04:23]
# 1

So what are you having trouble with?

P.S. It is normally a bad tactic to say that your problem is urgent. Many people will take this to mean that you have spent too long at the pub and not left yourself enough time for the task.

sabre150a at 2007-7-29 12:58:51 > top of Java-index,Security,Cryptography...
# 2

> So what are you having trouble with?

I want to know how to construct the modulus and exponent of the RSA public key from the given byte array.

buddy_boya at 2007-7-29 12:58:51 > top of Java-index,Security,Cryptography...
# 3

Extract the bytes of the exponent. Extract the bytes of the modulus. Create the BigInteger exponent and the BigInteger modulus. Create the RSA public key from the two BigIntegers.

sabre150a at 2007-7-29 12:58:51 > top of Java-index,Security,Cryptography...