MCPcopy Create free account
hub / github.com/DOSNetwork/core / Pick

Method Pick

group/mod/int.go:299–302  ·  view source on GitHub ↗

Pick a [pseudo-]random integer modulo M using bits from the given stream cipher.

(rand cipher.Stream)

Source from the content-addressed store, hash-verified

297// Pick a [pseudo-]random integer modulo M
298// using bits from the given stream cipher.
299func (i *Int) Pick(rand cipher.Stream) kyber.Scalar {
300 i.V.Set(random.Int(i.M, rand))
301 return i
302}
303
304// MarshalSize returns the length in bytes of encoded integers with modulus M.
305// The length of encoded Ints depends only on the size of the modulus,

Callers 15

listenFunction · 0.45
TestExchangeIDFunction · 0.45
TestRequestFunction · 0.45
newClientFunction · 0.45
CreateP2PNetworkFunction · 0.45
PointUnmarshalFromFunction · 0.45
ScalarUnmarshalFromFunction · 0.45
NewPriPolyFunction · 0.45
TestPublicAddFunction · 0.45
TestPublicPolyEqualFunction · 0.45
genPairFunction · 0.45
NewDistKeyGeneratorFunction · 0.45

Calls 1

SetMethod · 0.45

Tested by 12

listenFunction · 0.36
TestExchangeIDFunction · 0.36
TestRequestFunction · 0.36
TestPublicAddFunction · 0.36
TestPublicPolyEqualFunction · 0.36
genPairFunction · 0.36
TestVSSVerifierNewFunction · 0.36
TestVSSDHExchangeFunction · 0.36
genPairFunction · 0.36
TestTBLSFunction · 0.36