Function

SecRequirementCreateWithData

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

Declaration

OSStatus SecRequirementCreateWithData(CFDataRef data, SecCSFlags flags, SecRequirementRef  _Nullable *requirement);

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 kSecCSDefaultFlags 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

SecRequirementCopyData

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