# Question on RSAPublicKeySpec

Vishal Goenka (vgoenka@novell.com)
Thu, 08 Jan 1998 13:15:31 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jan Luehe: "Re: Question on RSAPublicKeySpec"
- Previous message: Scott Gallant: "javakey and netscape 404"
- Next in thread: Jan Luehe: "Re: Question on RSAPublicKeySpec"

    Message-Id: <s4b4d18d.043@novell.com>

    Date: Thu, 08 Jan 1998 13:15:31 -0700

    From: Vishal Goenka <vgoenka@novell.com>

    To: java-security@web1.javasoft.com

    Subject: Question on RSAPublicKeySpec

>From what I understand out of the way KeySpec and KeyFactory is used, in
order to create an RSAPublicKey from an encoded byte[] containing the key,
one needs to do something like this :

RSAPublicKeySpec keySpec = new RSAPublicKeySpec(keyData); // Assuming
byte[] keyData;
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey rsaPubKey = keyFactory.generatePublic(keySpec);

My question is that in the EarlyAccess of JCE, RSAPublicKeySpec doesn't have
a constructor that takes a byte[] as argument. Nor does the class
RSAPublicKey have any such constructor. Does it mean that I need to have
another class to convert the byte[] keyData to an RSAKey (with modulus and
exponent). If so, why would I use RSAPublicKeySpec at all ??

Thanks in anticipation,
Vishal Goenka
Novell

- Next message: Jan Luehe: "Re: Question on RSAPublicKeySpec"
- Previous message: Scott Gallant: "javakey and netscape 404"
- Next in thread: Jan Luehe: "Re: Question on RSAPublicKeySpec"