block = buffer;\r
else\r
{\r
- block=new byte[lastByteIndex];\r
- Buffer.BlockCopy(buffer,0,block,0,lastByteIndex);\r
+ block=new byte[lastByteIndex+1];\r
+ Buffer.BlockCopy(buffer,0,block,0,lastByteIndex+1);\r
}\r
var binHash = hasher.Digest(block);\r
var hash = binHash.ToHashString();\r
hash = hasher.Digest(buffer[idx]);\r
else\r
{\r
- var buf=new byte[lastByteIndex];\r
- Buffer.BlockCopy(buffer[idx],0,buf,0,lastByteIndex);\r
+ var buf=new byte[lastByteIndex+1];\r
+ Buffer.BlockCopy(buffer[idx],0,buf,0,lastByteIndex+1);\r
hash = hasher.Digest(buf);\r
}\r
\r