Close will put the hasher back into the pool.
()
| 612 | |
| 613 | // Close will put the hasher back into the pool. |
| 614 | func (m *hashWrapper) Close() { |
| 615 | if m.isMD5 && m.Hash != nil { |
| 616 | m.Reset() |
| 617 | md5Pool.Put(m.Hash) |
| 618 | } |
| 619 | if m.isSHA256 && m.Hash != nil { |
| 620 | m.Reset() |
| 621 | sha256Pool.Put(m.Hash) |
| 622 | } |
| 623 | m.Hash = nil |
| 624 | } |
| 625 | |
| 626 | const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569" |
| 627 | const ( |
no outgoing calls