Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global key1 := "nihuya ne poimesh okda"
- global key2 := "shifrator zaebis tak"
- global key3 := "eto ne nabor hui paimi kakih simvolov"
- Gui, Add, Edit, x43 y18 w380 h60 vText, Edit
- Gui, Add, Button, x42 y89 w90 h30 gcompile, Шифровать
- Gui, Add, Button, x332 y89 w90 h30 gdecompile, Дешифровать
- Gui, Show, w470 h136, Untitled GUI
- return
- GuiClose:
- ExitApp
- compile:
- Gui, Submit, NoHide
- total := cipher(text, key1, key2, key3)
- Clipboard := total
- MsgBox, % total
- return
- decompile:
- Gui, Submit, NoHide
- total := cipher(text, key3, key2, key1)
- Clipboard := total
- MsgBox, % total
- return
- Cipher(Src, Key1, Key2 = 0, Key3 = 0)
- {
- Loop, 3
- {
- If not Key%A_Index%
- Break
- StringSplit, Keys, Key%A_Index%
- Dest =
- Loop, Parse, Src
- {
- Index := Mod(A_Index, Keys0) + 1
- Key := Asc(Keys%Index%)
- Code := Asc(A_LoopField)
- Dest .= Chr(Code = Key ? Code : Code ^ Key)
- }
- Src := Dest
- }
- Return Dest
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement