Jump to content

Simple Encryption/decryption


Recommended Posts

This encryption is designed to only allow the decryption to be performed by the same user on the same machine. This can be changed by changing the passphrase. I wouldn't use this for anything of extreme importance, but it will keep simple passers by from reading your data. I hope :whistle:

Func Encrypt($UnCooked)
   Local $B, $S, $P
   Local $A1, $A2, $A3, $I, $j
   Local $Phrase = @ComputerName & @UserName;This is the passphase
   $j = 1
   For $I = 1 To StringLen($Phrase)
     $P = $P & Asc(StringMid($Phrase, $I, 1))
   Next

   For $I = 1 To StringLen($UnCooked)
     $A1 = Asc(StringMid($P, $j, 1))
     $j = $j + 1
     If $j > StringLen($P) Then $j = 1
     $A2 = Asc(stringMid($UnCooked, $I, 1))
     $A3 = BitXor($A1, $A2)
     $B = Hex($A3,2)
     If stringLen($B) < 2 Then $B = "0" + $B
     $S = $S & $B
   Next
   Return $S
EndFunc


Func Decrypt($Cooked)
   Local $Phrase = @ComputerName & @UserName;This is the passphase
   Local $B, $S, $P, $A1, $A2, $A3, $i, $j
   $j = 1
   For $i = 1 To StringLen($Phrase)
     $P = $P & Asc(StringMid($Phrase, $i, 1))
   Next

   For $i = 1 To StringLen($Cooked) Step 2
     $A1 = Asc(StringMid($P, $j, 1))
     $j = $j + 1
     If $j > StringLen($P) Then $j = 1
     $b = StringMid($Cooked, $i, 2)
     $A3 = Dec($b)
     $A2 = BitXor($A1, $A3)
     $S = $S & Chr($A2)
   Next
   Return $S
EndFunc
Link to post
Share on other sites
  • 2 months later...

coolness, though I'd suggest using the MAC address over the computername... I could rename my computer to something else and create a local user account with a duplicate name... but mac addresses are forever :D

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to post
Share on other sites

but mac addresses are forever

Not Really, I can set my MAC address to anything I want.

Quick google search would show ya.

:D ?

No, I bought a new network card and the cable company sucks for changing MAC addresses.

Now with the days of (if I get the term right) WarDriving, the MAC address emulators are very common.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to post
Share on other sites
  • 3 weeks later...
Guest Ezzetabi why cant log in when re

What I know: There are 2 MAC-addresses.

one in your network card (hardcoded)

one in your modem (hardcoded)

Can you explain how your ISP operator can change your MAC?

The Mac hardcoded cant be changed,

but you can force Windows believe you have the Mac you want.

Just Smac it.

http://www.cypherspace.org/adam/rsa/idea.html

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...