View Full Version : Crypto rot13 and numbers
10-25-2005, 07:26 AM
Can anyone help me in encryting number using the rot13?
I have had it for ages and never tested it with numbers, now I desperatley need to encrypt numbers with it.
Thanks in advance.
10-25-2005, 10:14 AM
ROT13 focuses on alphabetic characters only, rotate alphabet 13 characters. After you run your string through the rot13 encryption you can create your own function to take care of the numbers.
There might be a better way but you can try this, it should only convert numbers.
local stroutput = "";
for x = 1, String.Length(strEncryptMe) do
local num = String.Asc(String.Mid(strEncryptMe)
if num > 48 and num < 52 then
num = num+5;
elseif num > 53 and < 57 then
num = num-5;
stroutput = stroutput .. String.Char(num);
Powered by vBulletin™ Version 4.0.6 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.