Make a procedure which takes a text input and returns it in the encoded form. Also, make another procedure which can decode the same encoded form into the original text.
The encoding must be reversible.
Do not use any components for encoding nor any extensions. The algorithm must be implemented by yourself.
You may encode the input text into non-text forms also, given that it can be captured in a screenshot. (I won’t give more hints)
Try something unique.
Post the text or a screenshot of input, encoded form, and decoded form of all four of the given sample input, in this topic. Use “Do It” for screenshots or paste as text inside a fenced code block (use the following as a template).
I’m not participating in the challenge, but I wanted to show that it is possible to make this without any component. Even more, I made a simple coding and decoding system that generates a different code for the same string every time is called, and of course is totally reversible. The only drawback is that it doesn’t encode emojis.
This coding is not unbreakable but without seeing the encoding process it will be hard to find out.
(Thanks to @Taifun for his LEADING ZEROES procedure)
While writing the post for this challenge, I tried to cover most types of text used generally in the test cases. It seems we need to support “text to char code” and “char code to text” block which supports conversion of text to ascii/unicode char code and vice versa.