TBuffer.Tostring calls ConvertToHexString

Issue #328 resolved
Vincent Parrett created an issue

Trying to use the TripleDES class and ran into a problem where TBuffer.ToString is giving me a hex string - looked at the code and see it calls ConvertToHexString

I worked around it by doing this :

mystring := TEncoding.Unicode.GetString(output.AsBytes);

Comments (3)

  1. Stefan Glienke repo owner

    While the existence of ToHexString as well makes it a bit superflous I would argue this is the only proper implementation as we are talking about some byte buffer here which cannot be converted to a meaningful or even correct string in all cases.

    When you know that it’s a string using TEncoding.GetString as you did is the correct way.

  2. Log in to comment