Methods that return binary bytes do so by depositing the bytes in the output-only CkByteData object that is passed in the last argument. This is an object that would first be instantiated by the Python script, and then passed to the method. The empty CkByteData is passed in the last argument, and it is filled with the result bytes. The success/failure of any method returning bytes in this way is the boolean value returned by the method: True(success) / False(failure).

# grab a pointer to the bytes for Python to access.
# this is not copying the bytes -- it's just returning a pointer to the bytes.
p = encByteObj.getBytes()
f = open('h.enc', 'wb')
f.write(p)
f.close()