CFDataReplaceBytes
CFDataReplaceBytes is a function provided by the Core Foundation framework in Apple's operating systems, including macOS, iOS, watchOS, and tvOS. This function is used to modify the contents of a CFMutableData object by replacing a specified range of bytes with new data.
The function signature is CFDataReplaceBytes(CFMutableDataRef data, CFRange range, const UInt8 *replacementBytes, CFIndex replacementLength). The first parameter,
When CFDataReplaceBytes is called, the bytes in the data object from the start of the specified range