def hashed(source_filename, prepared_options, thumbnail_extension, **kwargs):
 parts = u':'.join(([source_filename] + prepared_options))
 short_sha = hashlib.sha1(parts.encode(u'utf-8')).digest()
 short_hash = base64.urlsafe_b64encode(short_sha[:9]).decode(u'utf-8')
 return u'.'.join([short_hash, thumbnail_extension])

def hashed ( source_filename , prepared_options , thumbnail_extension , ** kwargs ) : parts = u':' . join ( ( [ source_filename ] + prepared_options ) ) short_sha = hashlib . sha1 ( parts . encode ( u'utf-8' ) ) . digest ( ) short_hash = base64 . urlsafe_b64encode ( short_sha [ : 9 ] ) . decode ( u'utf-8' ) return u'.' . join ( [ short_hash , thumbnail_extension ] )
generate a short hashed thumbnail filename .