Example #1
0
def verify_hash(path, task):
    if verify_basic_hash(path, task):
        if task['type'] == 'ed2k':
            return lixian_hash_ed2k.verify_ed2k_link(path,
                                                     task['original_url'])
        else:
            return True
Example #2
0
def verify_hash(path, task):
	if os.path.getsize(path) != task['size']:
		print 'hash error: incorrect file size'
		return False
	if lixian_hash.verify_dcid(path, task['dcid']):
		if task['type'] == 'ed2k':
			return lixian_hash_ed2k.verify_ed2k_link(path, task['original_url'])
		else:
			return True
Example #3
0
def verify_hash(path, task):
    if os.path.getsize(path) != task['size']:
        print 'hash error: incorrect file size'
        return False
    if lixian_hash.verify_dcid(path, task['dcid']):
        if task['type'] == 'ed2k':
            return lixian_hash_ed2k.verify_ed2k_link(path,
                                                     task['original_url'])
        else:
            return True
Example #4
0
def verify_hash(path, task):
	if verify_basic_hash(path, task):
		if task['type'] == 'ed2k':
			return lixian_hash_ed2k.verify_ed2k_link(path, task['original_url'])
		else:
			return True
Example #5
0
def verify_hash(path, task):
    if verify_basic_hash(path, task):
        if task["type"] == "ed2k":
            return lixian_hash_ed2k.verify_ed2k_link(path, task["original_url"])
        else:
            return True
Example #6
0
def verify_hash(path, task):
	if os.path.getsize(path) == task['size'] and lixian_hash.verify_dcid(path, task['dcid']):
		if task['type'] == 'ed2k':
			return lixian_hash_ed2k.verify_ed2k_link(path, task['original_url'])
		else:
			return True