def METHOD_NAME(crypted, pw):
    """
    Use L{crypt.crypt} to Verify that an unencrypted
    password matches the encrypted password.
    @param crypted: The encrypted password, obtained from
                    the Unix password database or Unix shadow
                    password database.
    @param pw: The unencrypted password.
    @return: L{True} if there is successful match, else L{False}.
    @rtype: L{bool}
    """
    try:
        import crypt
    except ImportError:
        crypt = None
    if crypt is None:
        raise NotImplementedError("cred_unix not supported on this platform")
    if isinstance(pw, bytes):
        pw = pw.decode("utf-8")
    if isinstance(crypted, bytes):
        crypted = crypted.decode("utf-8")
    try:
        crypted_check = crypt.crypt(pw, crypted)
        if isinstance(crypted_check, bytes):
            crypted_check = crypted_check.decode("utf-8")
        return crypted_check == crypted
    except OSError:
        return False