The Liberty Basic Newsletter - Issue #92 - AUG 2001

© 2003, http://groups.yahoo.com/group/lbnews/

All Rights Reserved

Individual authors retain copyrights to their works.

"Keeping you up to date with the LB community!"

In this issue:

Liberty BASIC News
Liberty BASIC 3.0 Progress
Simple Encryption Demo 1

Simple Encryption Demo 2

 

 

For Future Issues
-Common Controls Written in Liberty BASIC, by Bubba
-Command Parsing for a Scripting Language, by Bubba
-A Look Into LB Spy, by Bubba
-Executing CGI Script Commands Within LB, by Tegan
-Open Source Liberty BASIC Game Development Studio, by Tegan



Liberty BASIC News

-The "2001, A Liberty BASIC Odyssey" contest is a short way from being restarted, the catigories are being shorted out, and the polls should be up soon.
-The "Liberty BASIC Word of Mouth" contest is almost over! Goto http://world.std.com/~carlg/aug01referralcontest.html for more details.



Liberty BASIC 3.0 Alpha Progress

Liberty BASIC Alpha testing is going great. Alpha 5 is expect to come out soon for testers.
Following the Alpha versions there will be public betas of LB3 if I'm correct.
There has been some talk about what it should cost.

Place your vote at http://groups.yahoo.com/group/lbnews/surveys?id=769448


Simple Encryption Demo 1

      
'Sometimes in your programs you may want to have an encrypted data file
       'that has passwords and registration codes stored. Below are some very
       'simple encryption demos. You should be able to understand the process
       'that it goes through by looking at it.
       'Copyright 2001 Tegan Snyder
nomainwin
WindowWidth=240
       WindowHeight=80
menu #1, "Decrypt", "Encode Encrpyted File", [decrypt]
       textbox #1.t, 2,6,170,20
       button #1.b, "Encrypt", [encrypt], UR, 2,6, 45, 19
open "String Encryption Demo" for window_nf as #1
       wait
[encrypt]
       print #1.t, "!contents? text$";
FOR CNTR = 1 TO LEN(text$)
       PASSLEN = ASC(MID$(text$, CNTR, 1))
       CODE = PASSLEN + (50 - CNTR)
       CODE$ = CODE$ + CHR$(CODE)
       NEXT CNTR
notice "Encrpyted Code is:"+chr$(13)+CODE$ 
OPEN "PASSWORD.FIL" FOR OUTPUT AS #encrypt
PRINT #encrypt, CODE$
CLOSE #encrypt
wait
[decrypt]
       OPEN "PASSWORD.FIL" FOR INPUT AS #decrypt
       INPUT #decrypt, PASS$
       CLOSE #decrypt
       FOR CNTR = 1 TO LEN(PASS$): PRINT LEN(PASS$)
       PASSLEN = ASC(MID$(PASS$, CNTR, 1))
       PASS = PASSLEN - (50 - CNTR)
       CODE2$ = CODE2$ + CHR$(PASS)
       NEXT CNTR
notice "Code Decrypted is:"+chr$(13)+CODE2$
wait

 


 

Simple Encryption Demo 2

       
       'Copyright 2001 Tegan Snyder
nomainwin
WindowWidth=240
       WindowHeight=80
       statictext #1.txt, "Choose an option from the file menu...", 20,8,200,        20
       menu #1, "&File", "&Encrpyt Text", [encrypt],        "&Decrypt Text", [decrypt],|,"&About", [about]
       textbox #1.t, 0,0,0,0
       button #1.b, "Encrypt", [encrypt], UR, 0,0, 0, 0
open "Secret Code" for window_nf as #1
wait
[encrypt]
       de=0
       en=1
       print #1.t, "!locate 2 6 170 20"
       print #1.b, "!locate 176 6 45 19"
       print #1.txt, "!locate 0 0 0 0"
       print #1.b, "Encrypt"
       print #1, "refresh"
       goto [process]
       [decrypt]
       en=0
       de=1
       print #1.t, "!locate 2 6 170 20"
       print #1.b, "!locate 176 6 45 19"
       print #1.txt, "!locate 0 0 0 0"
       print #1.b, "Decrypt"
       print #1, "refresh"
       goto [process]
       [process]
       print #1.t, "!contents? text$";
if de=1 then [decrypt.text]
       if en=1 then [encrypt.text]
wait
[encrypt.text]
       FOR CNTR = 1 TO LEN(text$)
       PASSLEN = ASC(MID$(text$, CNTR, 1))
       CODE = PASSLEN + (50 - CNTR)
       CODE$ = CODE$ + CHR$(CODE)
       NEXT CNTR
'notice "Encrpyted Code is:"+chr$(13)+CODE$ 
       print #1.t, CODE$ 
       wait
[decrypt.text]
       print #1.t, "!contents? PASS$";
       FOR CNTR = 1 TO LEN(PASS$): PRINT LEN(PASS$)
       PASSLEN = ASC(MID$(PASS$, CNTR, 1))
       PASS = PASSLEN - (50 - CNTR)
       CODE2$ = CODE2$ + CHR$(PASS)
       NEXT CNTR
print #1.t, CODE2$
       de=0
print #1.t, CODE2$ 
       wait
[about]
       print #1.t, "!locate 0 0 0 0"
       print #1.b, "!locate 0 0 0 0"
       print #1.txt, "!locate 25 8 220 20"
       print #1, "refresh"
       print #1.txt, "Program by Tegan Snyder - (C)2001"
       wait



Thank you for reading this months issue of the newsletter. I hope Andrew and I can bring a new issue to you for as long as we can. If you have any questions or if anything needs to be revised please email us at teg@tegdesign.com or andrew@britcoms.com and we will get back to you.


SUBMISSIONS

The Liberty BASIC Newsletter encourages all LB programmers to submit articles for publication. Everyone has something valuable to say, from beginners to veteran LBers. Consider sharing a code routine, with explanation. Perhaps you can review a favorite LB website, or program, or coding tool? Why not submit a list of questions that have been nagging at you? How about sharing your favorite algorithm?