send entropy in packets, validate entropy in received ACKs

This commit is contained in:
Marten Seemann
2016-04-17 14:21:36 +07:00
parent 922a2975e8
commit 1097698c4b
3 changed files with 57 additions and 7 deletions

View File

@@ -110,6 +110,14 @@ var _ = Describe("Utils", func() {
})
})
Context("Rand", func() {
It("returns either true or false", func() {
val, err := RandomBit()
Expect(err).ToNot(HaveOccurred())
Expect(val).To(SatisfyAny(Equal(true), Equal(false)))
})
})
Context("ReadUintN", func() {
It("reads n bytes", func() {
m := map[uint8]uint64{