Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
There are a lot of different ways to do this. For me the best is convert all in hexadecimal format. I've found this solution when I treated crypted fields in XML. Your string rappresentation would be 'A' = 65, 'AB' = 6566 and so on.. I suggest you to substitute a banal char shifting with a more complex algorithm (the letterature is full of documentation) otherwise if you must only 'hide' your original string this could be enough!
4th Jan 2017, 5:51 PM
Michael Isac Girardi
Michael Isac Girardi - avatar
+ 2
I know it is not as your request but I did this code to explain my way to crypt an ascii string: https://code.sololearn.com/cd84l7W4wS81/?ref=app
4th Jan 2017, 7:05 PM
Michael Isac Girardi
Michael Isac Girardi - avatar
0
use %26 to stay within the range of alphabetic characters. I posted 'simple character encode' in the playground (c++) https://code.sololearn.com/cqy5xyziILY6/?ref=app
4th Jan 2017, 5:51 PM
ifl
ifl - avatar