ID:154200
 
I was wondering if there is a way to encrypt a word into 3-digit numbers (ex. a=101,b=123,c=789,etc)and then put those numbers into a string (ex. hello=101123789) and then take the length of the encryption password (ex. pass=4,hi=2,mommy=5,etc.) and multiply the string by that number, resulting something like (4x101123789). Then, here's the tricky part...decrypting that....how would you decrypt it....divide inputed number by password length (4) then what? You have a string of numbers, how are you going to split it in threes with BYOND DM ?


Anyhelp would be gratefull,
thankZ,
¤unimatrix¤
I don't know how you would do that, but you would need one good coder.
In response to JordanUl
You'd have to use a series of textcopies, text2num, and num2text operations.

The first thing to decrypt it would be to usr round(length/3) to find out how long the word is. Then you'd have to use text2num, divide the whole thing by the length that you calculated. Then you could use num2text on that to create a string. Then use copytext in a while/for loop to parse out each three digit code. Then compare each of those values to an associative list containing the conversion table and start building the original password one character at a time.

Unless someone knows of a faster way it would probably be good to create the associative list in two forms, the encoding and decoding list so you don't have to loop through them to find the right conversion.