예제 #1
0
 public override BHash Finish()
 {
     using (SHA512CryptoServiceProvider SHA512 = new SHA512CryptoServiceProvider()) {
         hash = new BHashBytes(SHA512.ComputeHash(building, 0, buildingLoc));
     }
     return(hash);
 }
예제 #2
0
        public override BHash Finish()
        {
            MD5 md5 = MD5.Create();

            hash = new BHashBytes(md5.ComputeHash(building, 0, buildingLoc));
            return(hash);
        }
예제 #3
0
 public override BHash Finish(byte[] c, int offset, int len)
 {
     using (SHA512CryptoServiceProvider SHA512 = new SHA512CryptoServiceProvider()) {
         if (building.Length > 0)
         {
             AddBytes(c, offset, len);
             hash = new BHashBytes(SHA512.ComputeHash(building, 0, buildingLoc));
         }
         else
         {
             // if no 'Add's were done, don't copy the input data
             hash = new BHashBytes(SHA512.ComputeHash(c, offset, len));
         }
     }
     return(hash);
 }
예제 #4
0
        public override BHash Finish(byte[] c, int offset, int len)
        {
            MD5 md5 = MD5.Create();

            if (building.Length > 0)
            {
                AddBytes(c, offset, len);
                hash = new BHashBytes(md5.ComputeHash(building, 0, buildingLoc));
            }
            else
            {
                // if no 'Add's were done, don't copy the input data
                hash = new BHashBytes(md5.ComputeHash(c, offset, len));
            }
            return(hash);
        }