Example #1
0
 private byte[] ReadFromDbFile(DbFileResource dbFile, int capacity, long position)
 {
     byte[] data, hash;
     lock (dbFile)
         ReadFromDbFile(dbFile, capacity, position, out data, out hash);
     var control = new MD5CryptoServiceProvider().ComputeHash(data);
     if (!control.SequenceEqual(hash)) return null;
     return data; 
 }