Hi,
Encryption has come a long way since the late 70's but, here's a scheme that was used to be used to encrypt password files. The hexidecimal number of each character of the password was inverted.
File c:\Merry Christmas.txt
-------------------------------
We wish you a Merry Christmas.
We wish you a Merry Christmas.
We wish you a Merry Christmas.
And a Happy New Year.
-------------------------------
Al.Code:Sub Main() Open "c:\Merry Christmas.txt" For Input As #1 Open "c:\samtsirhC yrreM.txt" For Output As #2 Do While Not EOF(1) ToEncode = Hex(Asc(Input(1, 1))) If Len(ToEncode) = 1 Then ToEncode = "0" & ToEncode Encoded = Right(ToEncode, 1) & Left(ToEncode, 1) Print #2, Chr("&h" & Encoded); Loop Close Open "c:\samtsirhC yrreM.txt" For Input As #1 Open "c:\Merry Christmas.txt" For Output As #2 Do While Not EOF(1) ToDecode = Hex(Asc(Input(1, 1))) If Len(ToDecode) = 1 Then ToDecode = "0" & ToDecode Decoded = Right(ToDecode, 1) & Left(ToDecode, 1) Print #2, Chr("&h" & Decoded); Loop Close End Sub




Reply With Quote