Last active
April 26, 2021 15:45
-
-
Save JoeGlines/4e632885ab63ba3fd3aa6d4e7fdb5cb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#SingleInstance, Force | |
Constant:="90" ;Change this to a number you want | |
;********************What do you want to Encode?*********************************** | |
InputBox, Pass, Encode,What do you wish to encode?,,600,130 | |
Clipboard:=Encoded:=Encrypt(Pass,Constant) | |
InputBox, PlaceHolder, Encoded Value, % "Here is the encoded value", ,600,130,,,,,%Encoded% | |
;********************Now show taking it the other way*********************************** | |
MsgBox % "Here is the Decoded value: " Decrypt(Encoded,Constant) | |
return | |
Encrypt(OutputVar,Constant){ | |
Loop, Parse, OutputVar | |
{ | |
GuiControl,, Char, %A_LoopField% | |
Transform, OutputVar, Asc, %A_LoopField% | |
Outputvar-=Constant, NewVar.=OutputVar . "a" | |
} | |
Return, NewVar | |
} | |
Decrypt(OutputVar,Constant){ | |
Loop, Parse, OutputVar, a | |
Decrypted.= (Chr(A_LoopField+Constant)) | |
return, Decrypted | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment