[Dev-C++] Simple encryption/obfuscation
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ed C. <em...@to...> - 2004-01-11 23:49:56
|
Hello all, I need help on an algorithm. I need to accept username/password = combinations on the client side of a client-server app, store those on the client = side, and "decrypt" them again without user input, using only the stored = strings. Think the "remember my password" function in MS Outlook, IE, etc. Ideally, I would like to do this: On first run: 1) Accept email address 2) Accept username & password pairs 3) "Encrypt" username/password pairs with email address + some machine-dependent data as a key 4) Write these encrypted pairs and the email address to a text file On future runs: 1) Read the encrypted pairs 2) "Decrypt" them 3) Do stuff. The best idea I have now is some block-and-bit chunking and shifting - = break the string to encrypt into variable-length chunks, shuffle, reassemble, = bit rotate, repeat. The "decrypt" would simply reverse the process. My = concern is that anybody who knows the algorithm will be able to reverse it quite easily, given access to the text file. Any help is appreciated! -Ed |