
The current code accidentally ignores partial reads, since it doesn't check the return value of (io.Reader).Read. What we actually want is io.ReadFull(rand.Reader, buf), which is conveniently provided by rand.Read(buf). Signed-off-by: edef <edef@edef.eu>