github.com/crewjam/saml@v0.4.14/samlsp/util.go (about)

     1  package samlsp
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/crewjam/saml"
     7  )
     8  
     9  func randomBytes(n int) []byte {
    10  	rv := make([]byte, n)
    11  
    12  	if _, err := io.ReadFull(saml.RandReader, rv); err != nil {
    13  		panic(err)
    14  	}
    15  	return rv
    16  }