Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 6-Nov-12 0:59am
rpm3d520
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
rpm3d at 6-Nov-12 6:18am
   
thank you
i am research about it...and can you explain more??may be show me a sample??
OriginalGriff at 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 at 6-Nov-12 6:28am
   
thank you
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You may use, for instance AES. The C source code maybe found here: "Cryptography - 256 bit ciphers"[^] (I used it without problems).
  Permalink  
Comments
rpm3d at 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)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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[^].
  Permalink  

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

  Print Answers RSS
0 Marcin Kozub 330
1 OriginalGriff 256
2 Sergey Alexandrovich Kryukov 215
3 Praneet Nadkar 197
4 Richard MacCutchan 182
0 OriginalGriff 8,048
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100