MD5与SHA算法一样,利用他们可以计算某段数据的唯一hash值,常用做校验码.而MD5比SHA算法性能高.在我参加的一个项目中,主要用MD5码值来去重,因此对计算性能要求较高.网上有对MD5算法并行化方法,能保证计算结果与线性计算法一样.由于我只需要唯一标记,并不要求它与线性MD5计算结果一样,所以,我通过分片多线程计算的方法实现提速,也充分利用了多核CPU的并行计算优势. 依据: B = (b1,b2,b3,b4...bn)--->(m1,m2,m3...mn)----+--->M---…
# # Copyright (C) - Tobias Brunner # Copyright (C) - Andreas Steffen # Copyright (C) - Martin Willi # Hochschule fuer Technik Rapperswil # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General…