Here is my code, i will also give an example...

#include <iostream>

using namespace std;

class Encryption
{

	private:
		int wp, wk, encryption;

	public:
		Encryption()
		{ }
		Encryption(int password, int key)
			:wp(password), wk(key)
		{ }

		int Encrypt_Store() {
			encryption = wp + wk;
			cout << "Encypted: ( " << hex << encryption << " )" << endl;
			return encryption;
		}

		void Decrypt() {
			encryption -= wk;
			cout << "Decrypted: ( " << dec << encryption << " )" << endl;
		}

};

void main()
{
	// Create 2 objects
	Encryption First(100, 10);
	Encryption Second(200, 10);

	// Encrypt objects
	First.Encrypt_Store();
	Second.Encrypt_Store();

	// Decrypt
	First.Decrypt();
	Second.Decrypt();
}

http://imageshack.us/photo/my-images/23/68332891.png/

That i want from you guys is to watch photo below, i give you encrypted pass, you must decrypt it, Key+Pass is hided from image...

Good Luck :D

http://imageshack.us/photo/my-images/696/sdfsdfo.png/

'Decrypting' this is not possible, because the algorithm you have is something akin to a hash function: it is not possible to deduce the input from the output. The only information that we have is that the password+key=0x3AE045BA (which is 719340986 in the decimal system).

Cheers, xfbs

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.