packageattestation// import "github.com/opencontainers/runc/libenclave/attestation"import("encoding/binary""github.com/opencontainers/runc/libenclave/intelsgx""math/rand""time")// FIXME: how to make seed non-global?typeNoncestruct{seeduint64timeoutuint64// FIXME: use sync.mutex}func(n*Nonce)Generate()[]byte{timestamp:=uint64(time.Now().UnixNano())ifn.seed+n.timeout>=timestamp{n.seed=timestamp}buf:=make([]byte,intelsgx.NonceLength)binary.LittleEndian.PutUint64(buf,rand.Uint64())binary.LittleEndian.PutUint64(buf[intelsgx.NonceLength/2:],rand.Uint64())returnbuf}