Use better name and phpdocs for the hash generation part