import crypt


def check_hash(p,s,sha):
    """
    Checking the password with given sha with crypt
    """
    c_pass = crypt.crypt(p,s)
    if c_pass == sha:
        return 1
    else:
        return 0