code: def new(cls, password, rounds):
          
          if isinstance(password, str):
              password = password.encode('utf-8')
          return cls(cls._new(password, rounds))
docs: Creates a PasswordHash from the given password.