def hashing(file,pp):
    """ Map an input file and a postprocessing config to an unique hash.

    The hash is used to store the item in the database. It 
    needs to be persistent across different python implementations
    and platforms, so we implement the hashing manually.
    """
    file = file.lower()
    file = file.replace('\\','/')+":"+pp
    # SDBM hash
    res = 0
    for t in file:
        res = (ord(t) + (res<<6) + (res<<16) - res) % 2**32
    return '{:x}'.format(res)