473,804 Members | 4,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encryting and Decrypting between .Net and c++ 6.0

Hi,

I'm trying to find a way to encrypt data (strings) from my client
application (c++ 6.0) and transfer it to my server's .Net web services
application. The web services must be able to decrypt the data, make some
manipulations on the decrypted data, encrypt the result, send it back to the
client who would decrypt it again.

Thanks,
YN
Nov 17 '05 #1
1 1321
Yair,
I'm trying to find a way to encrypt data (strings) from my client
application (c++ 6.0) and transfer it to my server's .Net web services
application.


Sounds like you could use Microsoft CryptoAPI (CAPI) for this purpose. It is
available through both native Win32 code and .NET. Depending on your setup
and situation, you also need to figure out which encryption key(s) you are
going to use between the client and the server.

But remember that as it is a web service you a writing, using HTTPS (SSL)
might already be enough as then nothing is transferred in clear text on the
wire. In .NET, I also suggest that you take a look at the
System.Security .Cryptography namespace.

Here are some links that may prove to be helpful should you find CryptoAPI a
solution for you.

Platform SDK: Cryptography
http://msdn.microsoft.com/library/de...asp?frame=true

"Encrypting and decrypting data" form .NET This!
http://www.dotnetthis.com/Articles/Crypto.htm

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethi s.dystopia.fi
http://www.saunalahti.fi/janij/
Nov 17 '05 #2

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

Similar topics

10
7707
by: Alessandro Bottoni | last post by:
I know you will shake you head sadly but... I really have to perform such a suicidal task (even if for a short time and just for internal use). I have to send by email (over the open internet) a XML file containing _system commands_ (yes: the kind of stuff like "rm -dfr /") to a server and have a Python program sitting on this server, fetching and parsing the e-mail message and executing the commands (maybe with _root privileges_). Of...
3
4613
by: JW | last post by:
I can encrypt the contents of a memory stream with no problems, however when decrypting( I'm using the same key an IV ) I get an exception stating bad data. I'm at a lost. I'm actually creating a new memory stream, filling it with the encrypted bytes then trying to read from the crypto stream object. I have used the same approach encrypting to a file handle and then decrypting from the same file and it works.
0
1524
by: cmrchs | last post by:
Hi, Using the RSA-crypto algorithm in .NET , when actually encrypting/decrypting, all the code samples I ran into always used something like, to encrypt : // create keypair and store in container CspParameters param = new CspParameters(); param.KeyContainerName = "NewKeyContainer"; param.Flags = CspProviderFlags.UseMachineKeyStore; RSACryptoServiceProvider rsaObj = new RSACryptoServiceProvider(param);
3
14019
by: James | last post by:
Hi, I am developing a ActiveX Control which will be used in a web page. The control will encrypt some value then decrypt it when the web page opens next time. I tested the control in a windows application and it works fine and no error jumps. However, when I tried to use it in a web page, problems came. There is no problem for encrypting but the decrypting can't be finished. The error jumped from the line below
0
1381
by: cmrchs | last post by:
Hi, Using the RSA-crypto algorithm in .NET , when actually encrypting/decrypting, all the code samples I ran into always used something like, to encrypt : ' create keypair and store in container Dim param As New CspParameters param.KeyContainerName = "NewKeyContainer" param.Flags = CspProviderFlags.UseMachineKeyStore Dim rsaObj As New RSACryptoServiceProvider(param)
3
2886
by: dfa_geko | last post by:
Hi All, I had a question about encrypting and decrypting XML files using asymmetric keys. I copied some sample code from MSDN, here are the samples: http://msdn2.microsoft.com/en-us/library/ms229746.aspx http://msdn2.microsoft.com/en-us/library/ms229919.aspx The samples I used are the ones near the bottom of the page. (With a slight modification of moving edElement.KeyInfo.AddClause(new KeyInfoEncryptedKey
5
3447
by: Harb247 | last post by:
Hi Guys, First Post. Need some help decrypting a String / DB The company i manage recently had an argument with their lead programmer for their data base. However he has decided to have nothing to do with the company so i cannot contact him to get the info i require. Ive looked over his computer and accessed the .dat (I have no idea why its a .dat file) file using the password however when i open it up in Access i can view the data with...
4
5705
by: Fritjolf | last post by:
Hi. I've got a strange problem... I've made a simple program to test encryption/decryption. I use Rijndael encryption and here are the most important properties. RijndaelManaged cipher = new RijndaelManaged(); cipher.KeySize = 256; cipher.BlockSize = 256;
2
4704
by: prasath03 | last post by:
Hi, I wrote a java program for Encrypt and Decrypt the given string, when i execute the program it show me an error....but the string has Encrypted, if i want to Decrypt the string it show me an error... The error is: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher Encoded: --> pLqxYQViK5U Decoded: --> null
0
9589
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
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
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3000
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.