You're not transforming the bytes to a string. You're calling toString()
on a byte[]
, which returns the type of the array ([B
) followed by the @
symbol and by the hashCode of the array.
Use base 64 or Hex encoding to transform bytes to a printable string.