SetBytes sets the content of b to the given bytes. It panics if d is not of suitable size.
(d []byte)
| 50 | // SetBytes sets the content of b to the given bytes. |
| 51 | // It panics if d is not of suitable size. |
| 52 | func (b *Bloom) SetBytes(d []byte) { |
| 53 | if len(b) < len(d) { |
| 54 | panic(fmt.Sprintf("bloom bytes too big %d %d", len(b), len(d))) |
| 55 | } |
| 56 | copy(b[BloomByteLength-len(d):], d) |
| 57 | } |
| 58 | |
| 59 | // Add adds d to the filter. Future calls of Test(d) will return true. |
| 60 | func (b *Bloom) Add(d *big.Int) { |
no outgoing calls