the sha1() function will only return a 20 or 40 character string, by default the string length is 40:
function.sha1.php
if your password is being stored as 64 characters, it is using another encryption method. you will need to know the encryption method being used to be able to accomplish what you are trying to do.