Click here to Skip to main content
11,928,732 members (52,274 online)
Rate this:
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
Rate this: bad
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.
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
Rate this: bad
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).
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)
Rate this: bad
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[^].

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2015
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