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