rename and lift ProtocolMsg into API

This commit is contained in:
Matthias Radestock committed 2015-01-20 23:23:59 +00:00
1 parent d089900632
commit ac95d5ab29
5 files changed
+24 -25

No files matched your search

+2 -2
View File
@@ -207,7 +207,7 @@ func (ne *NaClEncryptor) Bytes() []byte {
if err = ne.conn.CheckFatal(err); err != nil {
return []byte{}
}
ne.conn.SendProtocolMsg(ProtocolNonce, encodedNonce)
ne.conn.SendProtocolMsg(ProtocolMsg{ProtocolNonce, encodedNonce})
ne.nonce = freshNonce
nonce = freshNonce
}
@@ -226,7 +226,7 @@ func (ne *NaClEncryptor) Bytes() []byte {
return []byte{}
}
ne.nonceChan <- nonce
ne.conn.SendProtocolMsg(ProtocolNonce, encodedNonce)
ne.conn.SendProtocolMsg(ProtocolMsg{ProtocolNonce, encodedNonce})
}
ne.offset = offset