TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ANDREAS BIRGERSON
from: STEVE BATSON
date: 1997-03-13 08:00:00
subject: Works in D1 but not D2

ab> Hello Steve!
ab> Monday March 10 1997 18:59, Steve Batson wrote to andreas birgerson:
SB> Basically, I don't encrypt them or let any encryption result in them.
SB> Therefore, I don't have to worry about them and my routine encrypts on 
he
SB> first pass and decrypts on the second pass without problems or revealing
SB> the password.
ab> uhhuh but what if the ORD(something) XOR (somethingelse) returns #32 
ab> ?when you decrypt such a string things will go wrong..
After some of the suggestions here, I woke up and went back over my code. 
Found all kinds of stupid mistakes...I was working on the thing in my spare 
time (what little there has been) and should caught most of this stuff before 
now. Anyway, the alogrithym I am using is this: 
1) grab character
2) If not space or null then XOR char with keychar
3) if encrypt character = space or null, restore original value
4) point to next char in key
5) if past last char in key, reset to start
6) if not end of buffer, go back to 1 
Remember, XOR encrypts the first pass and decrypts the second pass if you use 
the same key. By leaving the spaces and nulls alone in the encryption, if 
something get converted to a space or null as a result of the encryption, 
when I run it through again to decrypt, it wont get decrypted because the 
routine ignores any spaces or nulls.   
In any case, I did get it working properly, I have used this algorithym in 
the past with other languages, just hadn't tinkered with it in a while and 
decided to get working in Delphi. It's working great now. 
Thanks for the feedback. 
Steve
--- FreeMail 1.07b
(1:203/21)
---------------
* Origin: The Visual Programmer's Workshop - N.H., Ca (916)338-3230 *

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.