  
                                      
 L       BBBBBB        N   NNN  EEEE  WW          WW  SSSSSSSS
 L       BB  BB       NNN  NNN  EE  EE  WW      WW SSS  
 L       BBBBBB      NNNNN NNN  EEEE  WW  WWWW  WW SSSS
 L             NNNNNNNNNN  EE  WW WWWWWW WW SS
 L       BBBBBB    NNNNNNNNNNN  EE        WWWWWWWWWWWW   SSSSS
 L BB  BB   NNNN NNNNNN  EE  WWWWWW  WWWWW SSSSS
 LLLLLLL BBBBBB  NNNN   NNNNN  EEEEEEEE   WWWW    WWW SSSSSSSSS
                      
 ͻ
            The Liberty BASIC Newsletter - Issue #92 - August 2001              
               "Keeping you up to date with the LB community!"                  
                                                                                
                 (C)opyright 2001 The Liberty BASIC Community                   
            Published by Tegan Snyder and Andrew Sturges (a.k.a Bubba)          
                                                                                
            View the latest newsletters online at www.lbnews.cjb.net          
                                                                                
 ͼ 

		THIS ISSUE IS BEST VIED IN WORDPAD, FULLSCREEN, 
	     WITHOUT WORDWARP, AND WITH THE 'COURIER_NEW 10' FONT.
 
 In this Month's Issue
 ---------------------------------------------------------------------------------
 -Liberty BASIC News
 -Liberty BASIC 3.0 Progress
 -Code Snippits
 -Simple Encryption


 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



 Code Snippits
 ---------------------------------------------------------------------------------



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.