def __new__(cls, password_string: str):
    """
        The __new__ method is called when a new object is being instantiated from the class. In this case we use it to
        modify the construction logic of the str parent class to implement custom logic:
        When the string already is a hash, it will be set as the value of the string. If it is detected, that the given
        string is still a plain text password though, it will first be hashed.

        CHANGELOG

        Added 08.06.2019

        Changed 09.06.2019
        Added the distinction between the string already being a hash or a plain text password.

        :param password_string:
        :return:
        """
    if cls.is_hash(password_string):
        password_hash = password_string
    else:
        password_hash = cls.PASSWORD_HASHER.hash(password_string)
    return str.__new__(cls, password_hash)
