package elgamal import ( "git.ali33.ru/fcg-xvii/curve/v2/tools" "git.ali33.ru/fcg-xvii/go-tools/json" ) type Message struct { c *Curve c1 *tools.Point cd []*tools.Point encoded []byte } func (s *Message) Encoded() []byte { jm := json.Map{ "session_key": s.c1, "encoded": s.cd, } return []byte(jm.JSONPrettyString()) }