import hashlib


def is_valid_login(password, old_hash):
    """
    Validates login by extracting salt from old hash using it to hash
    the supplied password before comparison.
    """
    salt = bytes.fromhex(old_hash[-64:])
    new_hash = hashlib.pbkdf2_hmac(
        'sha256',
        password.encode('utf-8'),
        salt,
        100000
    ).hex()
    new_hash = new_hash + salt.hex()

    return new_hash == old_hash