Added check function, renamed hash to crypt.