es_process_t cdhash to String in Swift

Hi, could someone help me convert the cdhash property from es_process_t to a String in Swift.

Thanks.

var cdhash: (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)

Accepted Reply

Quinn's answer 4 years ago could be useful for this:

Yeah, if it were actually correct )-:

Thanks for remembering this because that answer definitely needed an update. I’ve done that now.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Sometimes, this forum is Great. Thanks Quinn.

  • Thanks to both for the help!!

Add a Comment

Replies

Try this:

let txt = cdhash.0 + "-" + cdhash.1 + "-" + cdhash.2 + "-" + cdhash.3 + "-" + cdhash.4 + "-" + cdhash.5 // etc… till 20

Or convert to array and use reduce on the array.

Quinn's answer 4 years ago could be useful for this:

https://developer.apple.com/forums/thread/72120

or this:

https://stackoverflow.com/questions/60725284/translating-tuple-to-array

Quinn's answer 4 years ago could be useful for this:

Yeah, if it were actually correct )-:

Thanks for remembering this because that answer definitely needed an update. I’ve done that now.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Sometimes, this forum is Great. Thanks Quinn.

  • Thanks to both for the help!!

Add a Comment