fix: hex encoding in digest() drops leading zeros (0)

1. using BigInteger with toString(16) results in the leading zeros of the
   hexcode being dropped.
2. a standard library (apache's hex encode/decode) was used instead.
3. i noticed in the server messages lower case was always used so it
   was also explicitly added to avoid problems with different
   implementations.
4. another problem which might arise is that getBytes() is called
   without a charset, is there a standard one in CM (which would avoid
   encoding problems)?

Change-Id: I2b86b4fc87c684778426b1131bf603ae91240034
Merge "fix: hex encoding in digest() drops leading zeros (0)" into cm-10.2