TripleDES with Hexadecimal Key

TripleDES with Hexadecimal Key

am 13.01.2008 18:49:31 von 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!

Re: TripleDES with Hexadecimal Key

am 14.01.2008 18:47:12 von 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

"Celia" wrote in message
news:0dcd82f2-3eaa-480d-81cf-749e6158fbd1@s8g2000prg.googleg roups.com...
>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!