original_docstring: Create a new hashed password using config driven Argon2 default or parameter overrides
docstring: Create a new hashed password using config driven Argon2 default or parameter overrides
docstring_tokens: Create a new hashed password using config driven Argon2 default or parameter overrides
code: def create(password: str, *, type: str = None, hash_len: int = None, salt_len: int = None, encoding: str = None, time_cost: int = None, memory_cost: int = None, parallelism: int = None):
      """Create a new hashed password using config driven Argon2 default or parameter overrides"""
      config = uvicore.config('uvicore.auth.hasher')
      if type is None: type = config.type
      if hash_len is None: hash_len = config.hash_len
      if salt_len is None: salt_len = config.salt_len
      if encoding is None: encoding = config.encoding
      if time_cost is None: time_cost = config.time_cost
      if memory_cost is None: memory_cost = config.memory_cost
      if parallelism is None: parallelism = config.parallelism
  
      # New Argon2 Password Hasher
      ph = PasswordHasher(type=Type[type], hash_len=hash_len, salt_len=salt_len, encoding=encoding, time_cost=time_cost, memory_cost=memory_cost, parallelism=parallelism)
      return ph.hash(password)
code_tokens: def create ( password : str , * , type : str = None , hash_len : int = None , salt_len : int = None , encoding : str = None , time_cost : int = None , memory_cost : int = None , parallelism : int = None ) : config = uvicore . config ( 'uvicore.auth.hasher' ) if type is None : type = config . type if hash_len is None : hash_len = config . hash_len if salt_len is None : salt_len = config . salt_len if encoding is None : encoding = config . encoding if time_cost is None : time_cost = config . time_cost if memory_cost is None : memory_cost = config . memory_cost if parallelism is None : parallelism = config . parallelism ph = PasswordHasher ( type = Type [ type ] , hash_len = hash_len , salt_len = salt_len , encoding = encoding , time_cost = time_cost , memory_cost = memory_cost , parallelism = parallelism ) return ph . hash ( password )
short_docstring: Create a new hashed password using config driven Argon2 default or parameter overrides
short_docstring_tokens: Create a new hashed password using config driven Argon2 default or parameter overrides
comment: """Create a new hashed password using config driven Argon2 default or parameter overrides"""$SEP$# New Argon2 Password Hasher