Add rpc request/response for handshake

This commit is contained in:
9seconds
2018-07-01 12:36:30 +03:00
parent 6253648356
commit b9ee1e1857
5 changed files with 112 additions and 7 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ type RPCNonceResponse struct {
Crypto [rpcNonceCryptoAESLength]byte
}
func (r *RPCNonceResponse) Bytes() []byte {
func (r *RPCNonceResponse) Bytes() *bytes.Buffer {
buf := &bytes.Buffer{}
buf.Grow(rpcNonceResponseLength)
@@ -25,7 +25,7 @@ func (r *RPCNonceResponse) Bytes() []byte {
buf.Write(r.CryptoTS[:])
buf.Write(r.Nonce[:])
return buf.Bytes()
return buf
}
func (r *RPCNonceResponse) Valid(req *RPCNonceRequest) error {