Fix Sum() returning bigger hash slice.

Previous commit failed to cut the slice properly, so that Sum() always
returned 64-byte slice regardless of the actual hash length. This change
fixes the bug and introduces a test for it.