X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fnncp%2Fpkt.go;h=cb75c237286383bbd0962cbfdeb01e0445c55acc;hb=dd92823db3d72fb21a4c712a7fb052dce16443dd;hp=e157bef68b9590004c8d42f6eea5d92c02f47878;hpb=05d433befb610aac3922c7a8f2afad2af8e23b4d;p=nncp.git diff --git a/src/cypherpunks.ru/nncp/pkt.go b/src/cypherpunks.ru/nncp/pkt.go index e157bef..cb75c23 100644 --- a/src/cypherpunks.ru/nncp/pkt.go +++ b/src/cypherpunks.ru/nncp/pkt.go @@ -4,8 +4,7 @@ Copyright (C) 2016-2019 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +the Free Software Foundation, version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -139,7 +138,8 @@ func aeadProcess( nonce []byte, doEncrypt bool, r io.Reader, - w io.Writer) (int, error) { + w io.Writer, +) (int, error) { var blkCtr uint64 ciphCtr := nonce[len(nonce)-8:] buf := make([]byte, EncBlkSize+aead.Overhead()) @@ -196,7 +196,8 @@ func PktEncWrite( nice uint8, size, padSize int64, data io.Reader, - out io.Writer) error { + out io.Writer, +) error { pubEph, prvEph, err := box.GenerateKey(rand.Reader) if err != nil { return err @@ -299,7 +300,8 @@ func PktEncRead( our *NodeOur, nodes map[NodeId]*Node, data io.Reader, - out io.Writer) (*Node, int64, error) { + out io.Writer, +) (*Node, int64, error) { var pktEnc PktEnc _, err := xdr.Unmarshal(data, &pktEnc) if err != nil {