Delphi Tips and Techniques 
 
 
Encrypt/Decrypt A File 
 
 
{The following very simple routine will encrypt and decrypt a Text File a line 
at a time.  The CR/LF is left unencrypted and the algorithm ensures that no 
encrypted Character can be < asciiz 127 *provided that* the Text For encrypting 
has no hi-bit Characters. 
 
Obviously this is just a skeleten example (untested) With no error checking but 
it should demonstrate what you need to do. After encrypting Text just reverse 
the parameters and run the Program again to decrypt the encrypted Text. 
} 
Program encrypt_Text; 
 
Uses Crt; 
 
Var 
  inText, 
  outText  : Text; 
  st       : String; 
  pw : longInt; 
 
Function ConvertTxt(s: String): String; 
  Var x : Byte; 
  begin 
    ConvertTxt[0] := s[0]; 
    For x := 1 to length(s) do 
      ConvertTxt[x] := chr(ord(s[x]) xor (Random(128) or 128)); 
  end;  { ConvertTxt } 
 
function enterpw:integer; 
 
var s : string; 
    ch : char; 
    err, z : integer; 
 
begin 
pw:=0; 
z := 1; 
s := ''; 
Write('Enter Password: '); 
repeat 
ch := upcase(readkey); 
case ch of 
     #8 : Begin 
     if z > 1 then begin 
        dec(z); 
        Delete(s,z,1); 
        write(ch); 
        clreol; 
        end; 
        end; 
     #13,#10,#27 : Begin 
     writeln; 
     writeln; 
     WriteLn('Processing...'); 
     end; 
     else 
         begin 
              s:=s+ch; 
              write('b'); 
              inc(z); 
         end; 
     end; 
until (ch = #13) or (ch = #10) or (ch = #27); 
if s = '' then begin 
writeln; 
textcolor(lightred); 
writeln('Error: Invalid Entry, Exiting'); 
textcolor(lightgray); 
halt(10); 
end; 
val(s,pw,err); 
enterpw:=pw; 
end; 
 
begin 
  clrscr; 
  Writeln('Text Encrypter V1.20 CopyLeft (C) Michael Webster 1995'); 
  WriteLn('FreeWare version!'); 
  WriteLn; 
  enterpw; 
  RandSeed  := pw;{ set to whatever value you wish - this is your "key" } 
  assign(inText,ParamStr(1)); 
  reset(inText); 
  assign(outText,ParamStr(2)); 
  reWrite(outText); 
  While not eof(inText) do begin 
    readln(inText,st); 
    Writeln(outText,ConvertTxt(st)); 
  end; 
  close(inText); 
  close(outText); 
  Writeln('Success!!'); 
end. 
------CUT----- 
 
now here is the file to hack.. its a list of numbers for PBX's/Loops 
 
-------CUT------- 
  'Y   Č   'y 毢 1  
b b'Y ~a      1 b   
   b   'yb 
  D (c)       b񪉤 
(c)   x  b3/4D(c) 
     'Y ,~A    
   Ģ x~A        
3/43x |     1  b  
 (r) ۀ   b'ĕ  b 
   'Y 3/4 xx     
'y     ~a'Y    3/4  1   
~ax   훐'Y3/43D 
x   |'Yb    
3 'Yb    돎      
  ~a'y'Y      
 (c)  1,몝    (r) 
   '3      
   ę(r)  1  'Y(r)   3 
   'y   3 1 x~a    
     3b3 bە   
戉    3ے  'Y    
      ۣ  ,  3/4  | 
   3'~A   (c) 
    D3'Y 1~A 
3/4    '|   '  D 
' 1 č x'Y 'y   '   
b(c)  'Y  D  뗏  1 
 D ~a3    ~a  1 
'Y    1   'y 
 1 ۉ 뚧昏'Y3 1 
          '       
       ,, (c)     
 |'Y     '     
 xD 'y   掁 x 11  
  ,3/4 3/41  D'y3   
퓅           | 
 '  'y b  '(r) 
      ᙍ  
   b(c)  b (c)  (c) 
   '(r)       
,~A     ۡ  , |  x 
'y~A,           
ۙD~a  ~A  ĕ   
       |   
 b ~a   | b   
  ~a    ~A 3~ab  
D  b        3/43 ' b 
 b'DD~a1  D3 
      3/4     
33/4  xč' 3/4    x'y~A 
(r)xb     1 ۃ Ⴤ    
      D (c),3 b   'y  
(c)   拍1bۋ  3/4 
ĕ|   3|b(c) ~a 
  b(r)   3     ĥ'y'b ' 
DD3~A1  'b  3   
1'y 'Y恓   ۍ~A3/4  b 
3/4   (r)  '   'Y   
    , x  'y  
        'y(c)  
 ۃ    '  b D 
,  (r) ~A'  3/4    
  (r)     3ۖ ~A D  
 'y        1     
(c) | b  'Y   
,  ~a| b31     
(c)   뇥    3/4   
   b     b3/4닍 
   ă| x        
 'Y ۃ |(c)       
~a,'3/4    ۪ 13   
 抍3,1~A        
 xD,(c) ~a   ' 
     b (r)Č'yD 
3/4 bۙ    ,   
(r) ,拫 ~a      
댚 3/4(r)(r) 3/4   
  'y     , 'y b   
~A1  1   ~ab 
      x1b,b3~A 
1  D |  ~A 1 
b , 1x 1  ~a(c) 'y  
    ,'Y     
 (r)    b 3   
b   ۅ  3/4,b 
   x~A   (c)   D   
'Y     ,  'Y D' 樨~ax  
     1  '  
   1   'y (c) ,   
   (c)'YDx , b 
  3  1 'Y~a  
b   |'yb~a   3/4 b 
 (c) 'Y       3 b 
        
~a  'y        ~A(c)  
 ć,    ~a  3,  ,  
      1 D  
 D       3 
  ĕ,'b     'yD  
    3 bċ     
 , bۖ     (c)~A   
  퍋~A    |    
     b3'Y  'b' 
  'Y'y(c)b 3/4b  3~A 
3/4b        (r) 
D(r) ~a    
 b 'Y  'y  3/4 3/4  
   , ' |    b 
b 1     ě  
  'Y넑    1      
  'y b ~a,3/4'  ~a(r) 
  ~a~a'Y        ۗ 
    'Y x 3x, 
  ,  1 bD  'Yۇ   
넡 ,   DD 'Y     
 ''Y3/4~a ,     
 'Yۑ 3/4'Y   'y(c)   
(r)눡D|ۙ Db   
  b   (r)D  | 
   ~a  x'y  'Y'y  
 (c) b뎃 ~A    3 
b ۆ      
|  b  񛥂 (r)~A    
(r)xx b    D b (c)  
''敃  1 D  (c) ' 
      3/4  (r)Į   , 
'y~A, 1b   
 ۯ    (c)  D 
(c) 'y 'Y' ~AD ~a b    ~A 
  |(c)    x    
  斤 D |    ' 1x 
~A D~A 3 , 
      'y   , 
 |    딙xb  
  휯|'y ~A  ~A D Ē 
3 3 3/4 3/4 (r) ,~a, b1  
 ~A~aۋ (r) (r)  '|x(c)  
b         3/4  
  ę1   b' ~A'    
3/4     b  (r) 
 'y~A|     'Y    
  ~A 1        ,''  
   33/4(c) |ዢ    
 '        '  
ᝥ  D  ۣx1~a(c) 
 'Y    D  D  'Y | 
 D D    'y  
~a'y  (r)    (r)     
      3/4   xb    
,x D'y'y  'Y'yb    
      'y~a 'Y   |  
    'y  b  ~A  ' 3/4  
    'y(c) x  ۣ  'YD ' 
1        b    b3' ~A  
   (r)       ~a 'y  
  (r) ~a  D  'Y 
 | 悒 (c) ~A   
~A x'y (r)       
1 bx  '  
(r)          핕    
 Č     (r)'Y(c) D 
 'y   D 'b b 攪 3/4 (c) 
x     ~a   3/4 3'y 
      1 '  (r)    
 x 'y   ہ  bD 
 b,|  ~A  ę3/4 
 x  (c)Ĩ 3/4 b   
 ' |       D3 
 'y 3/4     ~AD 'y   
'3  x    1~A 3/4  
  1  ~A1| D   
  ~a  (c)  ۊ ~A    '  
~a'Y      ,ۡD (c)'Y   
    'y   'Y'y 
 ~a  ~a ~A ĝ튏  D 
'y     'y检  , b    3/4 
        (r)   
1 놎     'y(c) 
D,۝b    'Y   
 D  x      
(r)(r)(c)D'yۉ    b   
   'y     D  
(c)    'Y  1x  
 ~Ax 'y   3 
'Y     ۚ~A   ' 'ی 
(r)   ' 1  'y (c)'y 
 b      x 
  |D  b~a 3/4   ~a 
       |慖 
           x 
 3/4~a' b3   x 
3/4   xۅ x   'y   ۏb  
 ,3   
  3/4 ~a  (r)'y   
    |'Y  '  ~a   
(r)      | D 'Yۥ  b D   
 ۢ       'y  
   ~a      |(r)  
 'Y 'y(r)3/4     '  
  'y  ە      (c)퐢  
    xb  ,D 'y 
 ~a ~a     ' 
 (r) 'Y      b 
b  ~A挮 b     
棏 'y3/4~a      
'y x۪      (r)' 
b ,DĀ 'Y1   
,x ᗒ  b    
------CUT------- 
 
there is a chalenge 
 
cya 
 
 
                                 _\\|//_ 
-Michael                        (` o-o ') 
-------------------------------ooO-(_)-Ooo----------------------------- 
Internet: websterm@inca.co.nz                | SuperNet: 127:345/220 
BBS: +64-9-833-9198 10Pm-7An ONLY! The Board | PowerNet: 260:5000/170 
    SpaceNet: 95:2000/13     .oooO     Oooo. | PaintNet: 300:2121/90 
                             (   )     (   ) 
------------------------------\ (-------) /---------------------------- 
                               \_)     (_/ 
               Operating at a higher level - I'm Warped! 
 
 
 
