Code Directory Hash from Audit Token

Hi I was wondering how I could get the code directory hash string of an app given its audit token. I would like to do this in Swift. Thanks.

Accepted Answer

The code in this post shows how to get a code object (SecCode) from an audit token. Once you have the code object, you can get the cdhash from that using kSecCodeInfoUnique.

Share and Enjoy

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

Answers

The code in this post shows how to get a code object (SecCode) from an audit token. Once you have the code object, you can get the cdhash from that using kSecCodeInfoUnique.

Share and Enjoy

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