write
Engine.write_ciphertext(ciphertext, file_path)- Saves the ciphertext to the specified path.
- Input:
Ciphertext- file_path:
str | pathlib.Path- Can be an absolute or relative path.
- Output:
None
Examples
Using an absolute path
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
engine.write_ciphertext(ciphertext, "/opt/desilo/ciphertext")
Using a relative path