remove ugly cred_hash3 function