X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fencless.go;h=f9d9bbfe075e587e6fd16fd9e023a62a5f343537;hb=5fd6174b77647f847a6e6db1cb7d5276747fcd39;hp=30eb4a5e33d9446f07c646c03bede769c4043339;hpb=5095c4864ad0285fa6a8ee177d8f5fa09caa6e85;p=govpn.git diff --git a/src/cypherpunks.ru/govpn/encless.go b/src/cypherpunks.ru/govpn/encless.go index 30eb4a5..f9d9bbf 100644 --- a/src/cypherpunks.ru/govpn/encless.go +++ b/src/cypherpunks.ru/govpn/encless.go @@ -19,6 +19,8 @@ along with this program. If not, see . package govpn import ( + "io" + "cypherpunks.ru/govpn/aont" "cypherpunks.ru/govpn/cnw" ) @@ -36,7 +38,7 @@ const ( func EnclessEncode(authKey *[32]byte, nonce, in []byte) ([]byte, error) { r := new([aont.RSize]byte) var err error - if _, err = Rand.Read(r[:]); err != nil { + if _, err = io.ReadFull(Rand, r[:]); err != nil { return nil, err } aonted, err := aont.Encode(r, in)