'how convert Octal to hexMD5 in java

I have a variable that contains an octal string like this:

String octalStr =  "\373\71\64\62\70\70\66\005\225\226"

(its exactly raw string)

how this string can be converted to MD5 hex?

Result Should Be "108b8dc2f9a891e9e8375bf23c23cabf"

I've tried too many ways, one of them:

1- split it by \

2- convert Octals array to Hex

3- convert Hex to bytes by .getBytes()

4- use MessageDigest.getInstance("MD5").

I think step 3 is wrong, cause .getBytes() accept charset and some octal numbers like 226 doesn't have any UTF-8 representation.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source