I need to generate on Kotlin a MD5 hash for some data, but as 16-characterString, not a 32-character String. I found no way fo that at this point and need help. But there is definitely a mothod exist, since I found website, which do it correctly.
Please check as example these sites:
https://www.freecodeformat.com/md516.php
https://www.freecodeformat.com/md5.php
As a control I am using this string – "1681799732000". The first site generates the correct answer with 16 characters – "92AA8DDBE039D480", The second link – 32 digit string – "E292561C92AA8DDBE039D4808CC51159".
Generating 32 character MD5 in Kotlin not a problem, but 16 character – actually is.
Could you kindly help me with this question?
EDIT 1 – Encoding is presumably UTF-8
>Solution :
If you put your control string into each of those you get back:
16: 92aa8ddbe039d480
32: e292561c92aa8ddbe039d4808cc51159
The 16 character result appears to be the 32 character result with the first and last 8 characters removed.