A way to encrypt messages, this code change the order of the message and change some letters for other symbols.
OnRun()
/////////////Encrypt Messages///////////
//Message
TextMessage := 'This message is encrypted';
Length := STRLEN(TextMessage);
//Message Encryption
i := Length;
REPEAT
Letter := COPYSTR (TextMessage,i ,1 );
ReverseMessage := ReverseMessage + Letter;
i := i - 1;
UNTIL i = 0;
EncryptedMessage := CONVERTSTR(ReverseMessage, 'AEIOUaeiou', 'º*!"#$.ç()');
MESSAGE(EncryptedMessage);
//Message Decryption
i := Length;
REPEAT
Letter := COPYSTR (EncryptedMessage,i ,1 );
ReverseMessage2 := ReverseMessage2 + Letter;
i := i - 1;
UNTIL i = 0;
EncryptedMessage := CONVERTSTR(ReverseMessage2, 'º*!"#$.ç()', 'AEIOUaeiou');
MESSAGE(EncryptedMessage);
0
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I mean it as a tip&trick, sorry for put it in wrong section.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In my version, the main loop looks something like this:
And run the same loop one more time to decrypt the text.
Just to make it clear: in NO way this is an example of at least basic security measure.
B3 Technologies - Making Technology Serve the People
http://mibuso.com/blogs/ara3n/2009/05/2 ... -with-ado/
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
hi there...
i just came cross this post, so pardon me for the very late query on this topic. but please can you explain a bit more about this technique...
thanks in advance
shona
That which you seek inside is that which you find outside
Pretty simple.
Every character has it's number in ASCII table. Max value is 255. Min value is 0.
We go through all characters of the string and make another character by subtracting it's number from 255.
e.g. we have string 'ABC', in ASCIIcodes it will be numbers 65 66 67, after our cycle we'll have symbols wih numbers 190 189 188 => string '╛╜╝'.