Hash in Databases: Indexing, Partitioning, and Secure Storage