deserialize
Engine.deserialize_lossy_bootstrap_key(data)
- Creates a lossy bootstrap key from a serialized data.
- Input:
- data: bytes or bytearray
- Output:
- LossyBootstrapKey
Examples
from desilofhe import Engine
engine = Engine(for_bootstrap=True)
secret_key = engine.create_secret_key()
lossy_bootstrap_key = engine.create_lossy_bootstrap_key(secret_key)
serialized_lossy_bootstrap_key = engine.serialize_lossy_bootstrap_key(
lossy_bootstrap_key
)
# bytearray
lossy_bootstrap_key = engine.deserialize_lossy_bootstrap_key(
serialized_lossy_bootstrap_key
)
# bytes
lossy_bootstrap_key = engine.deserialize_lossy_bootstrap_key(
bytes(serialized_lossy_bootstrap_key)
)