CloneBytes returns a copy of the bytes which represent the hash as a byte slice. NOTE: It is generally cheaper to just slice the hash directly thereby reusing the same bytes rather than calling this method.
()
| 73 | // NOTE: It is generally cheaper to just slice the hash directly thereby reusing |
| 74 | // the same bytes rather than calling this method. |
| 75 | func (h *Hash) CloneBytes() []byte { |
| 76 | newHash := make([]byte, HashSize) |
| 77 | copy(newHash, h[:]) |
| 78 | |
| 79 | return newHash |
| 80 | } |
| 81 | |
| 82 | // MarshalHash marshals for hash. |
| 83 | func (h *Hash) MarshalHash() (o []byte, err error) { |
no outgoing calls