]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/pkt.go
Forbid any later GNU GPL versions autousage
[nncp.git] / src / cypherpunks.ru / nncp / pkt.go
index e157bef68b9590004c8d42f6eea5d92c02f47878..cb75c237286383bbd0962cbfdeb01e0445c55acc 100644 (file)
@@ -4,8 +4,7 @@ Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
 
 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 {