5
I need to reduce the size of a string, but keep it in a predetermined character range.
Use an encryption routine that the result returned by it is a hexadecimal character set, par a par, representing the code ASCII
of the characters of a sentence.
That is, at the end of the processing of this routine the result is still subjected to a conversion using the function for conversion into hexadecimal:
for char in valResult do
result := result + IntToHex( ord(char), 2);
The result returned by this routine is what I need compact.
However, we will soon be changing this kind of routine to strong encryption, with asymmetric encryption, and then it will be necessary reduce the size/compact the result of the return of this type of routine.
So, How to compress string so that the result of this routine would have only the predetermined characters, in my case the following characters: A-Z and 0-9?
To facilitate understanding, good would be if we could have an example in Delphi, or even in another language that could later be converted.
@Bacchus, A-Z and 0-9 only. Letters only uppercase. Grateful!
– user3628
Before I try to adjust, you are aware that anything in these characters will be mere base 36 right? That is, it increases by about 40% in size...
– Bacco
@Bacco, sorry, I have no idea!
– user3628
This is tense! = ) I need a smaller string and using these characters to solve my problem. We cannot give up one or the other. However, as long as there is hope, there is struggle (rs). I will continue to insist a little more to try to find a solution to this problem.
– user3628