//0xf8ffd6db //f8 ff d6 db void Test(byte [] encryptedData, byte [] unencryptedData) { DataDecryptor d = new DataDecryptor { Key = 0xf8ffd6db }; d.Reset(); d.DecryptData(encryptedData, 0, encryptedData.Length); }
/// <summary> /// Call this from your IDriver if you have an entire frames worth of data to process. This useful only /// when processing keyframe data as it disregards any stateful information associated with the live stream. /// </summary> /// <param name="keyFrameData">The stream must contain complete data for a keyframe.</param> public void HandleReadAdHoc(Stream keyFrameData) { PacketReader keyFrameReader = new PacketReader(keyFrameData, new DecryptStreamDecorator(keyFrameData, _decryptor)); _decryptor.Reset(); bool keepReading; do { keepReading = keyFrameReader.ReadNext(); while (keyFrameReader.MessageQueue.Count > 0) { DispatchMessage(keyFrameReader.MessageQueue.Dequeue(), false); } } while (keepReading); // The live stream may not yet know its own event type because it probably // hasn't received the EventId message. So we copy the value across from the // keyframe. This is necessary to know how to deserialise car packets. UpdateEventType(keyFrameReader.CurrentEventType); }