473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Creating a PrivateKey from a byte array

Hi,

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?

Thanks,

Adrian
Jul 17 '05 #1
0 1712

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jake Haddock | last post by:
I have an application the contains an asynchronous client socket. The application uses the BeginReceive to specify the callback function and the byte array buffer for the received data. The data...
6
by: Dennis | last post by:
I was trying to determine the fastest way to build a byte array from components where the size of the individual components varied depending on the user's input. I tried three classes I built: (1)...
2
by: FB's .NET Dev PC | last post by:
I am writing two services in VB.NET, one of which needs to send text strings to the other. After reading, I decided (perhaps incorrectly) that named pipes would be the best interprocess...
7
by: Joe Van Dyk | last post by:
What's the best data structure to use if I want to store RGB color data (integers between 0-255 for red, green, and blue) for each pixel in an image? A vector of vector of vector of ints? (my...
5
by: jwgoerlich | last post by:
Hello, I need to create a 1 GB Byte array in memory. I can create it on a Win2000 system. On a Win2003 system, the application throws a System.OutOfMemoryException error. Both are running the...
2
by: mail.microsoft.com | last post by:
Hi, I would like to write a service in C# and I have the need to display a UI with status information, statistics, etc. If I use the Windows Service project in C#, I noticed that the...
0
by: zicko | last post by:
Hi all, I need to convert privatekey toXML format. I read privatekey from file. Here is how: -------------------------------- Dim myStream As System.IO.StringWriter = New...
8
by: Robert Dufour | last post by:
I been trying to look for samplecodes on how to create a simple tif file. I found a lot of commercial and stuff but I would prefer to roll my own. I only need to put some formatted text in a tif...
0
by: Dominik Amon | last post by:
Hi, I have a X509 certifikate, with public- and privatekey. For test reasons, I programed a small Consoleapplication, which executes with my user rights (Administrator). When I am reading an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.