Last active
August 3, 2017 00:26
-
-
Save hvsw/8e578f762a3c8daf49fe59644ddfb691 to your computer and use it in GitHub Desktop.
Hex string representing Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Data { | |
var hexString: String { | |
let hexString = map { String(format: "%02.2hhx", $0) }.joined() | |
return hexString | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment