MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / CRandBytes

Function CRandBytes

crypto/random.go:20–22  ·  view source on GitHub ↗

This only uses the OS's randomness

(numBytes int)

Source from the content-addressed store, hash-verified

18
19// This only uses the OS's randomness
20func CRandBytes(numBytes int) []byte {
21 return randBytes(numBytes)
22}
23
24// CRandHex returns a hex encoded string that's floor(numDigits/2) * 2 long.
25//

Callers 15

TestVoteSet_MakeCommitFunction · 0.92
TestMaxCommitBytesFunction · 0.92
makeHeaderRandomFunction · 0.92
TestRandomConsistencyFunction · 0.92
EncryptSymmetricFunction · 0.92
TestRollbackFunction · 0.92

Calls 1

randBytesFunction · 0.70

Tested by 15

TestVoteSet_MakeCommitFunction · 0.74
TestMaxCommitBytesFunction · 0.74
makeHeaderRandomFunction · 0.74
TestRandomConsistencyFunction · 0.74
TestRollbackFunction · 0.74
signHeaderMethod · 0.74