Advertisement
tabnation

ceaser chiper

May 16th, 2022
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. f1::
  3. InputBox, tobecoded, Enter Text, Enter the text you want to run in the chiper
  4. Clipboard := caesarCipher(tobecoded, 3)
  5. Return
  6.  
  7. f2::
  8. InputBox, tobeuncoded, Enter Text, Enter the text you want to decoded in the chiper
  9. Clipboard := caesarCipher(tobeuncoded, -3)
  10. Return
  11.  
  12. caesarCipher(text, shift, key = "abcdefghijklmnopqrstuvwxyz "){
  13. Loop, Parse, text
  14. encryptedString .= SubStr(key, Mod(Instr(key, A_LoopField, True) + shift, StrLen(key)), 1)
  15. return encryptedString
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement