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

      > :param string: string to be hashed
      > :return: a blake256 hash

      Example:
        >>> blake256("test")
        dc1ef7d25c8658590f3498d15baa87834f39a6208ddcb28fdfb7cc3179b8bf8f
    """
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)

    obj = blake.BLAKE(256)
    if salt is not None and front and not back:
        digest = obj.hexdigest(salt + string)
    elif salt is not None and back and not front:
        digest = obj.hexdigest(string + salt)
    else:
        digest = obj.hexdigest(string)
    return digest

      Create a Blake256 hash from a given string

      > :param string: string to be hashed
      > :return: a blake256 hash

      Example:
        >>> blake256("test")
        dc1ef7d25c8658590f3498d15baa87834f39a6208ddcb28fdfb7cc3179b8bf8f
    
Create a Blake256 hash from a given string
> :param string: string to be hashed
> :return: a blake256 hash
Create a Blake256 hash from a given string > : param string : string to be hashed > : return : a blake256 hash
def blake256(string, salt=None, front=False, back=False, **placeholder):
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)
    obj = blake.BLAKE(256)
    if salt is not None and front and not back:
        digest = obj.hexdigest(salt + string)
    elif salt is not None and back and not front:
        digest = obj.hexdigest(string + salt)
    else:
        digest = obj.hexdigest(string)
    return digest
def blake256 ( string , salt = None , front = False , back = False , ** placeholder ) : if type ( string ) is unicode : string = lib . settings . force_encoding ( string ) obj = blake . BLAKE ( 256 ) if salt is not None and front and not back : digest = obj . hexdigest ( salt + string ) elif salt is not None and back and not front : digest = obj . hexdigest ( string + salt ) else : digest = obj . hexdigest ( string ) return digest
Create a Blake256 hash from a given string
> :param string: string to be hashed
> :return: a blake256 hash
Create a Blake256 hash from a given string > : param string : string to be hashed > : return : a blake256 hash
"""
      Create a Blake256 hash from a given string

      > :param string: string to be hashed
      > :return: a blake256 hash

      Example:
        >>> blake256("test")
        dc1ef7d25c8658590f3498d15baa87834f39a6208ddcb28fdfb7cc3179b8bf8f
    """
string
salt
front
back
examples
None