github.com/yous1230/fabric@v2.0.0-beta.0.20191224111736-74345bee6ac2+incompatible/bccsp/idemix/bridge/rand.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 package bridge 7 8 import ( 9 amcl "github.com/hyperledger/fabric-amcl/core" 10 cryptolib "github.com/hyperledger/fabric/idemix" 11 ) 12 13 // NewRandOrPanic return a new amcl PRG or panic 14 func NewRandOrPanic() *amcl.RAND { 15 rng, err := cryptolib.GetRand() 16 if err != nil { 17 panic(err) 18 } 19 return rng 20 }