示例#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
示例#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
示例#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
示例#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
示例#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
示例#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