From d3aa2e75ba5ac87765832360b4663f536ae7892f Mon Sep 17 00:00:00 2001 From: Ivan Tomilov Date: Wed, 14 Jun 2017 19:16:03 +0700 Subject: [PATCH] Added json tags to Message and MessageHeader --- message.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/message.go b/message.go index 52487e8..15ae459 100644 --- a/message.go +++ b/message.go @@ -4,20 +4,20 @@ import "fmt" // Message is a single message exchanged by the parties. type Message struct { - Header MessageHeader - Ciphertext []byte + Header MessageHeader `json:"header"` + Ciphertext []byte `json:"ciphertext"` } // MessageHeader that is prepended to every message. type MessageHeader struct { // DHr is the sender's current ratchet public key. - DH Key + DH Key `json:"dh"` // N is the number of the message in the sending chain. - N uint + N uint `json:"n"` // PN is the length of the previous sending chain. - PN uint + PN uint `json:"pn"` } // MarshalBinary makes MessageHeader implement the BinaryMarshaler interface.