Incupsulated hash function