__len__

Plaintext.__len__
Returns the length of the plaintext. If a 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
plaintext = engine.encode(message)
length = len(plaintext) # 2