Skip to content

Commit

Permalink
Add tb serialize doc, small fix in message.go after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
masomel committed Nov 15, 2016
1 parent 22ae87f commit a22ef2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions protocol/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ type Response struct {
DirectoryResponse `json:",omitempty"`
}

// A CONIKS server sends a DirectoryResponse message when it returns cryptographic proofs
// about the key directory to a CONIKS client.
// A DirectoryResponse is a message that includes cryptographic proofs
// about the key directory that a CONIKS key server returns to a
// CONIKS client.
type DirectoryResponse interface{}

// A DirectoryProof response includes an authentication path AP for a
Expand Down
2 changes: 2 additions & 0 deletions protocol/tb.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type TemporaryBinding struct {
Signature []byte
}

// Serialize encodes the tb to a byte array with the following format:
// [strSig, tb.Index, tb.Value].
func (tb *TemporaryBinding) Serialize(strSig []byte) []byte {
var tbBytes []byte
tbBytes = append(tbBytes, strSig...)
Expand Down

0 comments on commit a22ef2b

Please sign in to comment.