Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anybody tried the ASCII

Status
Not open for further replies.

robherc

Programmer
Apr 20, 1999
921
US
Has anybody tried to encrypt-decrypt by mathematically altering the ASCII code for a message/file? If so, please give me some pointers as to what does/does not work as I'm having real troubles with my app.<br>
<br>
<br>
Thanks<br>
-robherc<br>
robherc@netzero.net
 
Sure. Keep it simple.<br>
Send me a sample and I'll see if I can find the problem.
 
Here. This is easy to code and difficult to break. QBASIC.<br>
<br>
INPUT "Enter key:", CryptKey&<br>
RANDOMIZE CryptKey&<br>
FOR R = 1 to LEN(Message$)<br>
MID$(Message$,R,1)=CHR$((INT(RND*255)+1)XOR ASC(MID$(Message$,R,1)))<br>
NEXT<br>
<br>
The same routine encrypts and decrypts based on the value of CryptKey&. Anyone trying to break the code would have to try all possible values for CryptKey&. Could be done... but it would take some time.<br>

 
Errr... "hypothetically" of course. Don't bet your James Bond on it until you debug it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top