lib/algorithms/hashing_algs.py
def sha3_256(string, salt=None, front=False, back=False, **placeholder):
    """
      Create a SHA3 256 hash from a given string

      > :param string: string to be hashed
      > :return: SHA3 256 hash

      Example:
        >>> sha3_256("test")
        36f028580bb02cc8272a9a020f4200e346e276ae664e45ee80745574e2f5ab80
    """
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)
    obj = sha3.sha3_256()
    if salt is not None and front and not back:
        obj.update(salt + string)
    elif salt is not None and back and not front:
        obj.update(string + salt)
    else:
        obj.update(string)
    return obj.hexdigest()

      Create a SHA3 256 hash from a given string

      > :param string: string to be hashed
      > :return: SHA3 256 hash

      Example:
        >>> sha3_256("test")
        36f028580bb02cc8272a9a020f4200e346e276ae664e45ee80745574e2f5ab80
    
Create a SHA3 256 hash from a given string
> :param string: string to be hashed
> :return: SHA3 256 hash
Create a SHA3 256 hash from a given string > : param string : string to be hashed > : return : SHA3 256 hash
def sha3_256(string, salt=None, front=False, back=False, **placeholder):
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)
    obj = sha3.sha3_256()
    if salt is not None and front and not back:
        obj.update(salt + string)
    elif salt is not None and back and not front:
        obj.update(string + salt)
    else:
        obj.update(string)
    return obj.hexdigest()
def sha3_256 ( string , salt = None , front = False , back = False , ** placeholder ) : if type ( string ) is unicode : string = lib . settings . force_encoding ( string ) obj = sha3 . sha3_256 ( ) if salt is not None and front and not back : obj . update ( salt + string ) elif salt is not None and back and not front : obj . update ( string + salt ) else : obj . update ( string ) return obj . hexdigest ( )
Create a SHA3 256 hash from a given string
> :param string: string to be hashed
> :return: SHA3 256 hash
Create a SHA3 256 hash from a given string > : param string : string to be hashed > : return : SHA3 256 hash
"""
      Create a SHA3 256 hash from a given string

      > :param string: string to be hashed
      > :return: SHA3 256 hash

      Example:
        >>> sha3_256("test")
        36f028580bb02cc8272a9a020f4200e346e276ae664e45ee80745574e2f5ab80
    """
string
salt
front
back
examples
None