mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-28 05:31:20 +00:00
Merge pull request #54 from tendermint/cRandHex-doc-fix
CRandHex: fix up doc to mention length of digits
This commit is contained in:
commit
4041adbf92
@ -44,7 +44,10 @@ func CRandBytes(numBytes int) []byte {
|
||||
return b
|
||||
}
|
||||
|
||||
// RandHex(24) gives 96 bits of randomness, strong enough for most purposes.
|
||||
// CRandHex returns a hex encoded string that's floor(numDigits/2) * 2 long.
|
||||
//
|
||||
// Note: CRandHex(24) gives 96 bits of randomness that
|
||||
// are usually strong enough for most purposes.
|
||||
func CRandHex(numDigits int) string {
|
||||
return hex.EncodeToString(CRandBytes(numDigits / 2))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user