__len__

LightPlaintext.__len__
Returns the length of the light plaintext. If a light plaintext represents data that is longer than the engine's slot count, it is internally encoded once per every slot count. This length represents the total number of encoded data divided by the engine's slot count.
  • Output
    • length, int
from desilofhe import Engine

engine = Engine()

message = [1] * 2 * engine.slot_count
light_plaintext = engine.encode_to_light_plaintext(message)
length = len(light_plaintext)  # 2