110,571
社区成员
发帖
与我相关
我的任务
分享
HMACSHA1 hmac = new HMACSHA1(BitConverter.GetBytes(HashKey[0]));
hashes = hmac.ComputeHash(data);//其中一个文件块,共n块
HMACSHA1 hmac2 = new HMACSHA1(BitConverter.GetBytes(HashKey[0]));
hashes = hmac2.ComputeHash(fstream); //计算文件流hmac值// 计算
using (BinaryReader binReader = new BinaryReader(File.Open(this.FileName, FileMode.Open)))
{
while (current < this.Count) //总共执行Count块
{
//计算当前块的BF
this.ComputeHash(binReader.ReadBytes(this.BlockSize), current);
current++;
}
}