write

Engine.write_plain_matrix(plain_matrix, filename)
지정된 경로에 행렬 평문을 저장합니다.
  • 인풋:
    • PlainMatrix
    • filename: str
      • 절대 경로, 상대 경로 전부 가능합니다.
  • 아웃풋:
    • 없음

예시

Using an absolute path

import numpy as np

from desilofhe import Engine

engine = Engine(slot_count=64)

message = np.arange(64 * 64).reshape(64, 64)
plain_matrix = engine.encode_to_plain_matrix(message)
engine.write_plain_matrix(plain_matrix, "/opt/desilo/plain_matrix")

Using a relative path

import numpy as np

from desilofhe import Engine

engine = Engine(slot_count=64)

message = np.arange(64 * 64).reshape(64, 64)
plain_matrix = engine.encode_to_plain_matrix(message)
engine.write_plain_matrix(plain_matrix, "plain_matrix")