User-defined callback function used with win32file::WriteEncryptedFileRaw
Function is called with 3 parameters: (Data, CallbackContext, Length)
Data: Writeable buffer to be filled with raw encrypted data. Buffer memory is only valid within the callback function.
CallbackContext: The arbitrary object passed to WriteEncryptedFileRaw.
Length: Size of the data buffer.
Your implementation of this function should return a tuple of 2 ints containing an error code (ERROR_SUCCESS on success), and the length of data written to the buffer.
Function exits when 0 is returned for the data length.