There should be a way to get the contents of a Data object in hexadecimal form.
The description methods do not provide that, as it was the case with NSData:
It's worth noting that, if Data.description returned a hex dump (or some other complete representation of the instance's contents), then we could provide a compatible Data.init(_: String) and then conform Data to LosslessStringConvertible.
martinr448 commentedAug 29, 2016
Additional Detail from JIRA
md5: 641850a22679507d5d233e1d7021576d
Issue Description:
There should be a way to get the contents of a
Data
object in hexadecimal form.The description methods do not provide that, as it was the case with
NSData
:Of course I can cast to
NSData
but it would be nice to have a "native" method. Suggestions:
description
returns a hex dump, ordebugDescription
returns a hex dump, ora new
hexEncodedString
method, similar to the existing Base64 methods.The text was updated successfully, but these errors were encountered: