import hashlib


def check_password(hashed_password, input_password):
    """
    Check if the input password is correct or not.

    :param hashed_password:
        Hashed string of previous input password.
    :type hashed_password: str
    :param input_password:
        Checking password in clear text.
    :type input_password: str
    :return: True if the clear text password is correct else False.
    """

    password, salt = hashed_password.split(':')
    return \
        password == hashlib.sha512(salt.encode() + input_password.encode()).\
        hexdigest()