public void Test06()
        {
            UInt64 [] input          = { 0xFFFFFFFFFFFFFFFF, 0x8000000000000000, 0x0000000000000000, 0x0000000000000001, 0x7FFFFFFFFFFFFFFF };
            byte []   expectedResult = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.U8) << 2) | 0x02),   0,  40,
                                         255,                                                                                                        255, 255, 255, 255, 255, 255, 255,
                                         128,                                                                                                          0,   0,   0,   0,   0,   0,   0,
                                         0,                                                                                                            0,   0,   0,   0,   0,   0,   0,
                                         0,                                                                                                            0,   0,   0,   0,   0,   0,   1,
                                         127,                                                                                                        255, 255, 255, 255, 255, 255, 255 };

            U8ArraySECSItem secsItem = new U8ArraySECSItem(input, SECSItemNumLengthBytes.TWO);

            Assert.AreEqual(secsItem.ToRawSECSItem(), expectedResult);
        }
Ejemplo n.º 2
0
		public void test09()
		{
			UInt64[] input = new UInt64[5];
			input[0] = 0xFFFFFFFFFFFFFFFF;
			input[1] = 0x8000000000000000;
			input[2] = 0x0000000000000000;
			input[3] = 0x0000000000000001;
			input[4] = 0x7FFFFFFFFFFFFFFF;
			byte[] expectedResult = { (byte)((SECSItemFormatCodeFunctions.getNumberFromSECSItemFormatCode(SECSItemFormatCode.U8 ) << 2) | 0x03), 0, 0, 40,
				255, 255, 255, 255, 255, 255, 255, 255,
				128, 0, 0, 0, 0, 0, 0, 0,
				0, 0, 0, 0, 0, 0, 0, 0,
				0, 0, 0, 0, 0, 0, 0, 1,
				127, 255, 255, 255, 255, 255, 255, 255 };

			U8ArraySECSItem secsItem = new U8ArraySECSItem(input, 3);
			Assert.IsTrue(secsItem.ToRawSECSItem().SequenceEqual(expectedResult));
		}