BytesToHash sets b to hash. If b is larger than len(h), b will be cropped from the left.
(b []byte)
| 58 | // BytesToHash sets b to hash. |
| 59 | // If b is larger than len(h), b will be cropped from the left. |
| 60 | func BytesToHash(b []byte) Hash { |
| 61 | var h Hash |
| 62 | h.SetBytes(b) |
| 63 | return h |
| 64 | } |
| 65 | |
| 66 | // BigToHash sets byte representation of b to hash. |
| 67 | // If b is larger than len(h), b will be cropped from the left. |