TripleDES with Hexadecimal Key

C

Celia

I am working with a web service which requires enryption of some XML
fields. It will be symmetric encryption - TripleDES.

The vendor has given me the Key that we will share. With the exception
that there are 48 characters in the actual Key that he gave me, here
is an example of what he gave me: 0E329232EA6D0D73 (The vendor has
told me to use all zeros for the IV.)

How can I use this with the .Key property of
TripleDESCryptoServicerProvider? I realize that what he is giving me
is hexadecimal, but how do I convert it a .Key that I can use with
the .NET framework. The only way that I can see to set the .Key
property is: Dim objDES.Key as Byte() = {48, 3, 17, 131, 202, .....and
so on}

How do I either convert the .Key that the vendor has given me to the
VB.NET language above - or is there another to set the .Key property
that I am overlooking?

Any help anyone could give would be hugely appreciated - thanks!
 
G

George Ter-Saakov

It 0E329232EA6D0D73 is hexadecimal notation of 14, 50, .... in decimal
where did 48, 3, 17, 131, 202, came from?

Use calc.exe to convert it to decimal and write correct values
Dim objDES.Key as Byte() = {14, 50, }

Or you can use
Int32.Parse("0E", NumberStyles.HexNumber )
Int32.Parse("32", NumberStyles.HexNumber )
.....


George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top