This commit is contained in:
Jack Robison 2018-06-29 15:47:00 -04:00
parent 7b8ab21b6c
commit a3ac49182c
3 changed files with 106 additions and 70 deletions
dht/bits

View file

@ -344,6 +344,11 @@ func MaxP() Bitmap {
return FromHexP(strings.Repeat("f", NumBytes*2))
}
// Min returns a bitmap with all bits set to 0
func MinP() Bitmap {
return FromHexP(strings.Repeat("0", NumBytes*2))
}
// Rand generates a cryptographically random bitmap with the confines of the parameters specified.
func Rand() Bitmap {
var id Bitmap