home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
maksiu
/
utils
/
eaissue3b.lha
/
Source_Code
/
AK_Encrypter_2.AMOS
/
AK_Encrypter_2.amosSourceCode
Wrap
AMOS Source Code
|
1995-12-30
|
2KB
|
66 lines
' Program Encrypter.
'
' Written by Andrew "Mushroom" Kellett (C) Mushroom PD.
'
' This encrypter will encrypt the following letters and symbols :
'
' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
' '~!"�$%^&*()_-+=\|/?.>,<[]{} 91 symbols
' Any other symbol found will be ignored, but may be messed up when Encrypted.
'
Dim T1(921)
Screen Open 0,640,50,4,Hires : Paper 0 : Cls : Curs Off : Flash Off
Centre "MPD File encrypter program V2" : Print
Centre "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" : Print : Print
DAT1:
Data 124,41,62,55,61,60,126,122,88,51,113,121,103,72,89,48,57,110
Data 111,104,116,106,85,47,81,112,38,71,108,92,54,107,119,56,46
Data 43,117,39,50,163,101,98,40,95,123,34,67,37,97,33,93,68,66
Data 109,52,83,65,45,90,78,69,73,125,49,70,80,100,94,118,36,82
Data 102,79,114,86,63,105,42,76,84,99,120,115,91,44,74,77,53,87
Data 75,32
Restore DAT1 : For N=1 To 91 : Read T1(N) : Next N
F$=Fsel$("","","Select SOURCE file")
If F$="" Then Edit
G$=Fsel$("","","Select DEST file")
Open In 1,F$ : Reserve As Data 10,Lof(1) : Reserve As Data 11,Lof(1) : Close
Bload F$,10 : LE=0 : LE2=Length(10) : MPD=Execall(-132)
J$=" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'~!"+Chr$(34)+"�$%^&*()_-+=\|/?.>,<[]{}"
Amos Lock : Break Off
Repeat
T=Timer/50
If T<>T2
Centre "Bytes to go :"+Str$(LE2)+" "
T2=T
End If
P=Peek(Start(10)+LE) : CHAR=-1
For N=1 To 91
If Mid$(J$,N,1)=Chr$(P)
CHAR=T1(N) : Goto NXT
End If
Next N
NXT:
If CHAR=-1
CHAR=P
End If
Poke Start(11)+LE,CHAR : Dec LE2 : Inc LE
Until LE2=0
MPD=Execall(-138) : Wait Vbl
Bsave G$,Start(11) To Start(11)+Length(11)