|
| 01 Jul 2012 07:59 PM |
Letters = {a = 11, b = 12, c = 13, d = 14, [[5]] = 63, [[8]] = 64, [[7]] = 65}
function Encrypt(msg) return msg:gsub("%a", Letters) end function Decrypt(num) return tostring(num):gsub("%d%d", (function(i) for k, v in pairs(Letters) do if i == tostring(v) then return k end end end)) end
I'm not sure why this won't work. Please help. Thanks! |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2012 08:07 PM |
| %d%d should be (%d%d) to properly capture. |
|
|
| Report Abuse |
|
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
|
| 01 Jul 2012 08:14 PM |
| Encryption can get you into hot water on an international forum, if your in the USA anyway. |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2012 08:16 PM |
@gg
this is really just encoding. |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2012 08:26 PM |
| I'm so sorry, meant to place this in Scripting Helpers. |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2012 09:45 PM |
| Cypher block chaining is the way to go! |
|
|
| Report Abuse |
|
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
|
| 01 Jul 2012 11:08 PM |
| @popsicleman, one time pad, nuff said. |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2012 08:21 AM |
@gg
wut u tink mah encrypted messages r? harharhar |
|
|
| Report Abuse |
|
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
|
| 02 Jul 2012 11:11 AM |
| Too bad popsiclehombre, I will have to be a one time pad hipster. |
|
|
| Report Abuse |
|
|