Function

SecRequirementCopyData

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

Declaration

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

Parameters

requirement

A valid code requirement object.

flags

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

data

On return, the code requirement in the form of a binary blob.

Return Value

Discussion

You can extract the binary blob from the CFDataRef object and store it in any form you wish. Use of this function is the only publicly supported way to get such a data blob. You can use the SecRequirementCreateWithData function to convert it back to a code requirement object.

See Also

Code Requirements as Data

SecRequirementCreateWithData

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