Here is my observation : I modified the code a little bit adding few sops with individual bytes and the corresponding hexadecimal value.
Input: asdfda
16::10
60::3c
105::69
57::39
-60::-3c
110::6e
19::13
-52::-34
Encoded Value:103c6939c46e13cc
As you can see the items on the left are the bytes and on the right we have the individual biginteger with radix 16 values, and at the bottom we have the encoded value. You might seeing a big pattern matching. except the values with -tive. like -60 corresponds value -3c , but as with 1 byte consersion the value becames c4 ( see yourslef).
Now I tested with the value to encrypt as u7mzqw2, lets see what happens.
Input: u7mzqw2
-1::-1
-125::-7d
52::34
-128::-80
15::f
61::3d
122::7a
118::76
Encoded value:-7ccb7ff0c2858a
Now do you see the pattern matching, now you won't , why not ? lets see, well -1 whose hexadecimal should be -1 ? ??? , no it is 0XFF, now can we represent 0xFF in Byte ? No, we can't. read yourself Byte and -1
Update: what puzzled me was how these encoding was evaluated ? Still looking , help me identify this