473,778 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TripleDES with Hexadecimal Key

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: 0E329232EA6D0D7 3 (The vendor has
told me to use all zeros for the IV.)

How can I use this with the .Key property of
TripleDESCrypto ServicerProvide r? 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!
Jan 13 '08 #1
1 2096
It 0E329232EA6D0D7 3 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.He xNumber )
Int32.Parse("32 ", NumberStyles.He xNumber )
.....
George

"Celia" <c.********@gma il.comwrote in message
news:0d******** *************** ***********@s8g 2000prg.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: 0E329232EA6D0D7 3 (The vendor has
told me to use all zeros for the IV.)

How can I use this with the .Key property of
TripleDESCrypto ServicerProvide r? 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!

Jan 14 '08 #2

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

Similar topics

0
3089
by: Jonas | last post by:
I have the following perl program witch i use to encrypt a password file with. In perl 5.6 this program works like a charm but when trying it on the RED HAT EL 3 platform (taroon) is doesnt decrypt the encrypted string right. Program use Crypt::TripleDES; sub generate() {
8
13540
by: wkodie | last post by:
I'm having trouble encrypting/decrypting a simple string using the System.Security.Cryptography.TripleDESCryptoServiceProvider, etc... The encryption works, but the decryption does not properly decrypt several of the first few characters. Here's the code: class TMyCipher {
7
17879
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm able to encrypt and then decrypt data okay as in the following code: // encrypt the data // Encryptor enc = new Encryptor(EncryptionAlgorithm.TripleDes); byte key = Encoding.ASCII.GetBytes("0123456789012345");
2
30546
by: GRB | last post by:
A client wants me to decrypt a cookie. They encrypted the data in java using TripleDES. The key provided is a 168 bit 44 character key, DESede alogorithm. Ive tried to decrypt in vb.net and get the above error. Below is the class I use and the code I use to call it. Not sure wher I'm going wrong here. The TripleDES service provider only uses a 192 bit 24 character length key. Any help would be greatly appreciated.
8
18655
by: Vijay | last post by:
Hi , I am doing a small project in c. I have a Hexadecimal file and want to convert into ascii value. (i.e., Hexadecimal to Ascii conversion from a file). Could anyone help me? Thanks in adv.
7
19233
by: elliotng.ee | last post by:
I have a text file that contains a header 32-bit binary. For example, the text file could be: %%This is the input text %%test.txt Date: Tue Dec 26 14:03:35 2006 00000000000000001111111111111111 11111111111111111111111111111111 00000000000000000000000000000000 11111111111111110000000000000000
6
14704
by: Andrea | last post by:
Hi, suppose that I have a string that is an hexadecimal number, in order to print this string I have to do: void print_hex(unsigned char *bs, unsigned int n){ int i; for (i=0;i<n;i++){ printf("%02x",bs); } }
4
2625
by: Celia | last post by:
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...
0
2171
by: qfmomen | last post by:
I have encrypted password in db added by java application using tripleDES. I need to build same class but it is giving me different result. This class i have used: JavaProject: Making TripleDES Simple in Visual Basic .NET. Free source code and programming help Any help? Qurban
0
9629
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10296
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7474
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2863
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.