BBS: Inland Empire Archive Date: 01-19-93 (12:39) Number: 323 From: CORIDON HENSHAW Refer#: NONE To: MATT HART Recvd: NO Subj: POINTS Conf: (2) Quik_Bas
Hello Matt!
In a msg of <16 Jan 93>, Matt Hart writes to Michelle Robinson:
MH> If you want to encrypt it, use an encrypt program:
[...]
MH> MID$(A$,i,1) = CHR$(ASC(MID$(A$,i,1))+1)
S-L-O-W!
MH> A simple encryption - just makes each letter the following one, so A
MH> becomes B, C becomes D, and so on.
This is more secure and faster:
===Chop===
'Hex2Bin 1.0
DEFINT A-Z: OPEN "B", #1, "XORSTR.OBJ": OPEN "B", #2, "H"
DO: READ I$: IF I$ = "-1" THEN EXIT DO
PUT #2, , I$: LOOP: I$ = " ": SEEK #2, 1: DO UNTIL
LOC(2)=LOF(2): GET #2, , I$
O$ = CHR$(VAL("&H" + I$)): PUT #1, , O$: LOOP: CLOSE : KILL "H"
DATA 800E000C504B5443525950542E41534DD696270000064447524F55500D504B54435259
DATA 50545F54455854044441544104434F4445055F444154417F980700483900030501D798
DATA 07004800000604010E9A040002FF025F901000000109584F52535452494E4700000086
DATA 88040000A201D1A03D00010000558BEC51505356571E068B4E068E5E0A8E46088B760E
DATA 8B7E0C8A24268A0532C426880546474983F9007402EBEC90071F5F5E5B58595DCA0A00
DATA 618A02000074
DATA -1
===Chop===
When XORSTR.OBJ is extracted, LINK or LIB it into a QLB or
LIB. Calling syntax follows:
===Chop===
DECLARE SUB XORString (BYVAL S1Offset%, BYVAL S2Offset%,
BYVAL S1Segment%,_ BYVAL S2Segment%, BYVAL SLength%)
' S1Offset% = plaintext string offset.
' S2Offset% = password string offset.
' S1Segment% = plaintext string segment.
' S2Segment% = password string offset.
' Slength% = length of both strings.
'
' IMPORTENT! Both the password and plaintext strings MUST
be the same length. ' Otherwise, XORString will hang.
'
' The cyphertext is returned in place of the password.
===Chop===
\ Coridon Henshaw \ ³
\ Sirrus Software \ \ ³ /
\ Sysop, \ ÄÄÄÄ*ÄÄÄÄ
\ TCS Concordia \ / ³ \
\ 34:3416/18 \ ³
...Brotherly love for brotherly love, but cheese for money.
--- GEcho 1.00
* Origin: Politicly INcorrect and damn proud of it (1:250/820)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET