public byte[] GetFileHash(byte[] contents) { using (MemoryStream stream = new MemoryStream(contents, false)) return EncryptionUtil.GetHash(stream); }