By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,106 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

Creating a PrivateKey from a byte array

P: n/a

I have a 256 byte array in my code which I have to use a key in a
MD5withRSA hash.
As far as I can tell, in order to use the MD5withRSA algorithm I need
to use the Singature object.
In order to initiate the Signature object, I need a PrivateKey object.

How do I instantiate a PrivateKey object using my byte array?

I have only managed to create a SecretKey object with my byte array,
but the Signature requires a PrivateKey. I can not cast a SecretKey to
a PrivateKey...

What is the easiest way to create and initialze a new PrivateKey?


Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.