Function

SecRequirementCreateWithData(_:_:_:)

Creates a code requirement object from the binary form of a code requirement.

Declaration

func SecRequirementCreateWithData(_ data: CFData, _ flags: SecCSFlags, _ requirement: UnsafeMutablePointer<SecRequirement?>) -> OSStatus

Parameters

data

A binary blob created earlier from a valid code requirement object by calling the SecRequirementCopyData(_:_:_:) function.

flags

Optional flags; see SecCSFlags for possible values. Pass defaultFlags for standard behavior.

requirement

On return, contains a code requirement object that behaves identically to the one from which the data blob was obtained.

Return Value

Discussion

You can use the SecRequirementCopyData(_:_:_:) function to convert a code requirement object to a binary blob, and store the blob in any form you wish. When you are ready to use the code requirement in another function call, you can use the SecRequirementCreateWithData(_:_:_:) function to convert it back to a code requirement object.

See Also

Code Requirements as Data

func SecRequirementCopyData(SecRequirement, SecCSFlags, UnsafeMutablePointer<CFData?>) -> OSStatus

Extracts a binary form of a code requirement from a code requirement object.