public int Read(byte[] pv, int offset, int count) { if (Length == 0L) { return(0); } encryptedVideoFile.Seek(offset, SeekOrigin.Begin); int length = encryptedVideoFile.Read(pv, 0, count); VideoEncryption.DecryptBuffer(pv, length, offset); return(length); }
public void Read(byte[] pv, int offset, int count, IntPtr pcbRead) { if (Length == 0L) { return; } encryptedVideoFile.Seek(offset, SeekOrigin.Begin); int length = encryptedVideoFile.Read(pv, 0, count); VideoEncryption.DecryptBuffer(pv, length, (long)offset); if (!(IntPtr.Zero != pcbRead)) { return; } Marshal.WriteIntPtr(pcbRead, new IntPtr(length)); }