public void Deserialize(BEReader reader)
        {
            CryptoKey        = reader.ReadUInt16PrefixedBlob();
            ServerInitVector = reader.ReadUInt16PrefixedBlob();
            ClientInitVector = reader.ReadUInt16PrefixedBlob();
            SignHash         = reader.ReadUInt16PrefixedBlob();

            Endpoints = reader.ReadUInt16PrefixedArray <AuxiliaryStreamEndpoint>();
        }
 protected override void DeserializePayload(BEReader reader)
 {
     Flags       = (DeviceFlags)reader.ReadUInt32();
     DeviceType  = (DeviceType)reader.ReadUInt16();
     Name        = reader.ReadUInt16PrefixedString();
     HardwareId  = Guid.Parse(reader.ReadUInt16PrefixedString());
     LastError   = reader.ReadUInt32();
     Certificate = CryptoExtensions
                   .DeserializeCertificateAsn(reader.ReadUInt16PrefixedBlob());
 }
Ejemplo n.º 3
0
        public void TestUInt16PrefixedBlob()
        {
            byte[] data = new byte[]
            {
                0x00, 0x03, 0xDE, 0xAD, 0xBE
            };
            BEReader reader = new BEReader(data);

            byte[] result = reader.ReadUInt16PrefixedBlob();

            Assert.Equal <int>(3, result.Length);
            Assert.Equal <byte[]>(new byte[] { 0xDE, 0xAD, 0xBE }, result);
        }
 public override void Deserialize(BEReader reader)
 {
     SequenceBegin = reader.ReadUInt32();
     SequenceEnd   = reader.ReadUInt32();
     Data          = reader.ReadUInt16PrefixedBlob();
 }