I am trying to use this API from Python 2.7, but I am having trouble. The documentation shows:
# data is a CkByteDatabut Python does not allow parameters (outdata) to receive results.
I notice that some of the API's have lower-case equivalents (i.e., encryptBytes) that return the output instead of the status. If I try that, I get an exception: "AttributeError: encryptBytes"
Ideally, I'd like to pass bytes (the Python type) in, and receive bytes back so as to eliminate conversions, as throughput is an issue. Ditto for decrypt.
asked Oct 11 '15 at 18:24
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).