Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Calculate a shorthash.

        def make_shorthash(tail, original_format, size, width, height):
    """Calculate a shorthash."""

    # Normalize the data.
    tail = hashlib.sha512(tail).hexdigest()
    original_format = FORMATS[original_format.lower()]
    size, height, width = map(int, (size, height, width))

    values = tail, original_format, size, height, width

    return ':'.join(map(str, values))
        


src/p/i/pif-HEAD/pif/local.py   pif(Download)
import pif.dictdb
 
from pif import TAILHASH_SIZE, make_shorthash
 
 
 
        shorthash = make_shorthash(
            tailhash,
            image.format,
            statinfo.st_size,

src/p/i/pif-HEAD/pif/hash.py   pif(Download)
import pif.dictdb
 
from pif import TAILHASH_SIZE, make_shorthash
 
LOG = logging.getLogger(__name__)
 
        return photo_id, make_shorthash(
            f.read(),
            photo['originalformat'],
            int(f.headers['content-range'].split('/')[-1]),