Click here to Skip to main content
15,881,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi every body
i hope you be fine
i am working on a program depends on socket programming
that is cross platform
and this program send file between come computers
so now i wanna encrypt my files and in destination decrypt that
....
i am blind about encrypt and decryptions
can you say me how is it??
now i am searching about this maybe this is depends on md5 and how\??
and source code in qt is there??
if i use puclic /private keys can i use linux and windows both...
and other thing you think recommend and advice to me i am glad to hear that
thank you all
Posted

MD5 is not an encryption algorithm - it is a hashing algorithm. If you use it to "encrypt" your data, you will not be able to decrypt it as hashing algorithms are not reversible. (And MD5 is not recommended for new applications anyway, because it is considered "broken").

You could use public / private key encryption, but for point - to point DES might be a better choice. C++ DES libraries are freely available, and you should find one you like quite easily with Google.
 
Share this answer
 
Comments
rpm3d 6-Nov-12 6:18am    
thank you
i am research about it...and can you explain more??may be show me a sample??
OriginalGriff 6-Nov-12 6:25am    
:laugh: Not really - it will depend on the library you chose, but I'm pretty sure that most of them will have instructions and / or examples.
rpm3d 6-Nov-12 6:28am    
thank you
You may use, for instance AES. The C source code maybe found here: "Cryptography - 256 bit ciphers"[^] (I used it without problems).
 
Share this answer
 
Comments
rpm3d 6-Nov-12 6:29am    
thank you friend i try to use i hope i can use without problems too
and this years in there what have mean??( (2000-2003)
If this file or data is transferred via a network, I'd recommend using SSL, using OpenSSL witch is free and cross-platform library: SSL Programming Tutorial[^].

Even though, you don't have to start form scratch. Since you use QT, use what it provides you Secure Networking with QtSSLSocket[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900