签名按字节散列? [英] Signature hash by byte?

查看:58
本文介绍了签名按字节散列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我的文本格式的签名数据库超过一百万行,这就是为什么我的扫描速度下降的原因.我确定我需要实现一些不同的更有效的代码以达到更好的扫描速度,但是我的问题是我应该如何使用md5散列或crc32散列按字节进行扫描,以便它仅在知道其前几个字节的情况下才读取是否匹配,然后快速移至下一个文件?还有我怎么做二进制搜索?还是用这种方法扫描?

Currently my Signature database in text format is over one million lines which is the reason as why my scan speeds have decreased. I am sure that I need to implement some different more efficient code to achieve better scan speeds as well but my question is how might I scan using md5 hash or crc32 hash by byte so that it will only read the first few bytes before it knows its a match or not to then quickly move to the next file? also how might I do binary search? or scan with this method?

推荐答案

MD5和SHA哈希不能那样工作-它们是文件中所有字节的完整摘要. 您想要做的就像是将1000个整数序列的前三个整数相加,并希望能够从中得知有关结果总数的信息-它只是行不通.
MD5 and SHA hashes do not work like that - they are a complete summary across all the bytes in the file.
What you are trying to do is like adding the first three integers of a 1000 integer sequence and expecting to be able to tell something about the resulting total from that - it just doesn''t work.


这篇关于签名按字节散列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆