| 325 | func cloneHash(in hash.Hash, h crypto.Hash) hash.Hash { |
| 326 | // Recreate the interface to avoid importing encoding. |
| 327 | type binaryMarshaler interface { |
| 328 | MarshalBinary() (data []byte, err error) |
| 329 | UnmarshalBinary(data []byte) error |
| 330 | } |
| 331 | marshaler, ok := in.(binaryMarshaler) |
| 332 | if !ok { |
| 333 | return nil |