Changed hash creation to php