Use hash_hmac() rather than crypt() to generate hash.