Could you please elaborate on the significance and purpose of hash codes in the context of cryptocurrency and finance? How does it contribute to the security and integrity of the blockchain system? Additionally, how does the uniqueness of hash codes play a role in ensuring that transactions are not tampered with?