Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. const g_Key = "%$#¨$TYFTYFUCFSUG g guf7t6iwit&y80u?¦4ì4¦H-+bâ¦??v)µtFTOd8fn=±l=(-+²¦°a(^/;.´~ç´~]ç´[234]~23ç4[´ç342]~3ç423].;23.]4ç23[´4çrsd]fsdofhs9890=-f09gdlfç[´´`^]~[~[~[´~]~[^^]~]^[´~]~]~[;[~/]~[]~[~[~];ç´[~q[sd~[a~dkajdioasdjmasdpaisdjåb415?56??1?U¦6546"
  2.  
  3. function EnCrypt (strCryptThis) {
  4. let iKeyChar;
  5. let iStringChar;
  6. let iCryptChar
  7.  
  8. let strEncrypted;
  9.  
  10. for (i = 1; i < strCryptThis.length; i++) {
  11. iKeyChar = g_Key.charCodeAt(g_Key.substring(i, 0))
  12. iStringChar = strCryptThis.charCodeAt(strCryptThis.substring(i, 0))
  13.  
  14. iCryptChar = (iKeyChar && !iStringChar) || (!iKeyChar && iStringChar)
  15.  
  16. if (iCryptChar == false) {
  17. iCryptChar = 0
  18. } else {
  19. iCryptChar = 1
  20. }
  21.  
  22. iCryptChar = (iCryptChar + i)
  23. console.log
  24. iCryptChar = iCryptChar % 256
  25.  
  26. if (iCryptChar.length = 1) {
  27. strEncrypted = strEncrypted + "if1" + iCryptChar.toString()
  28. } else if (iCryptChar.length = 2) {
  29. strEncrypted = strEncrypted + "if2" + iCryptChar.toString()
  30. } else if (iCryptChar.length = 3) {
  31. strEncrypted = strEncrypted + iCryptChar.toString()
  32. }
  33.  
  34. return strEncrypted;
  35.  
  36. }
  37. }
  38.  
  39. console.log(EnCrypt("fabiano"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement