loadEncryptedData#
- load_encrypted_data(context: pyhelayers.HeContext, buf: bytes) pyhelayers.EncryptedData #
Loads encrypted data (a CTileTensor object) from the given buffer.
- Parameters:
context – The HeContext to initialize the CTileTensor with.
buf – The buffer to load from.
- Raises:
RuntimeError – If the given buffer does not contain a CTileTensor or if loading fails due to an illegal header of the CTileTensor object in the given buffer.
-
std::shared_ptr<EncryptedData> helayers::loadEncryptedData(const HeContext &context, std::istream &stream)#
Loads encrypted data from the given stream.
- Parameters:
context – The HeContext to initialize the EncryptedData with.
stream – The stream to load from.
- Throws:
runtime_error – If the given stream does not contain an EncryptedData object or if loading fails due to an illegal header of the EncryptedData object in the given stream.