• Home
  • Raw
  • Download

Lines Matching refs:univ

20 from pyasn1.type import univ
31 self.o = univ.Integer().subtype(
41 assert encoder.encode(univ.Integer(12)) == ints2octs((2, 1, 12))
44 assert encoder.encode(univ.Integer(-12)) == ints2octs((2, 1, 244))
47 assert encoder.encode(univ.Integer(0)) == ints2octs((2, 1, 0))
51 substrate = encoder.encode(univ.Integer(0))
56 assert encoder.encode(univ.Integer(-1)) == ints2octs((2, 1, 255))
60 univ.Integer(0xffffffffffffffff)
65 univ.Integer(-0xffffffffffffffff)
71 assert encoder.encode(12, asn1Spec=univ.Integer()) == ints2octs((2, 1, 12))
74 assert encoder.encode(-12, asn1Spec=univ.Integer()) == ints2octs((2, 1, 244))
77 assert encoder.encode(0, asn1Spec=univ.Integer()) == ints2octs((2, 1, 0))
81 0xffffffffffffffff, asn1Spec=univ.Integer()
87 assert encoder.encode(univ.Boolean(1)) == ints2octs((1, 1, 1))
90 assert encoder.encode(univ.Boolean(0)) == ints2octs((1, 1, 0))
95 assert encoder.encode(True, asn1Spec=univ.Boolean()) == ints2octs((1, 1, 1))
98 assert encoder.encode(False, asn1Spec=univ.Boolean()) == ints2octs((1, 1, 0))
104 self.b = univ.BitString((1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1))
125 assert encoder.encode(univ.BitString([])) == ints2octs((3, 1, 0))
132 self.s = univ.BitString()
159 self.o = univ.OctetString('Quick brown fox')
186 self.s = univ.OctetString()
214 self.o = univ.OctetString().subtype(
242 assert encoder.encode(univ.Null('')) == ints2octs((5, 0))
247 assert encoder.encode(None, univ.Null()) == ints2octs((5, 0))
253 univ.ObjectIdentifier((1, 3, 6, 0, 0xffffe))
258 univ.ObjectIdentifier((0, 39))
263 univ.ObjectIdentifier((1, 39))
269 univ.ObjectIdentifier((2, 40))
275 univ.ObjectIdentifier((2, 0xffffffff))
281 univ.ObjectIdentifier((2, 47))
287 univ.ObjectIdentifier((2, 48))
293 univ.ObjectIdentifier((2, 100, 3))
299 univ.ObjectIdentifier((2, 560))
305 univ.ObjectIdentifier((2, 16843570))
310 univ.ObjectIdentifier((2, 5))
315 encoder.encode(univ.ObjectIdentifier((3, 1, 2)))
323 encoder.encode(univ.ObjectIdentifier((0,)))
331 encoder.encode(univ.ObjectIdentifier((0, 40)))
339 encoder.encode(univ.ObjectIdentifier((1, 40)))
347 univ.ObjectIdentifier((2, 18446744073709551535184467440737095))
353 univ.ObjectIdentifier((2, 999, 18446744073709551535184467440737095))
361 (1, 3, 6, 0, 0xffffe), asn1Spec=univ.ObjectIdentifier()
368 univ.Real((123, 10, 11))
373 univ.Real((0.5, 2, 0)) # check encbase = 2 and exponent = -1
377 r = univ.Real((3.25, 2, 0))
385 …binEncBase, encoder.typeMap[univ.Real.typeId].binEncBase = encoder.typeMap[univ.Real.typeId].binEn…
387 univ.Real((0.00390625, 2, 0)) # check encbase = 16
389 encoder.typeMap[univ.Real.typeId].binEncBase = binEncBase
393 …binEncBase, encoder.typeMap[univ.Real.typeId].binEncBase = encoder.typeMap[univ.Real.typeId].binEn…
395 univ.Real((1, 2, 0)) # check exponenta = 0
397 encoder.typeMap[univ.Real.typeId].binEncBase = binEncBase
401 univ.Real((3, 2, -1020)) # case of 2 octs for exponent and
408 univ.Real((1, 2, 262140)) # case of 3 octs for exponent and
415 univ.Real((-1, 2, 76354972)) # case of >3 octs for exponent and
420 assert encoder.encode(univ.Real('inf')) == ints2octs((9, 1, 64))
423 assert encoder.encode(univ.Real('-inf')) == ints2octs((9, 1, 65))
426 assert encoder.encode(univ.Real(0)) == ints2octs((9, 0))
432 (123, 10, 11), asn1Spec=univ.Real()
478 s = univ.SequenceOf()
482 s = univ.SequenceOf()
483 s.setComponentByPosition(0, univ.OctetString('quick brown'))
487 s = univ.SequenceOf()
488 s.setComponentByPosition(0, univ.OctetString('quick brown'))
494 s = univ.SequenceOf()
495 s.setComponentByPosition(0, univ.OctetString('quick brown'))
501 s = univ.SequenceOf()
502 s.setComponentByPosition(0, univ.OctetString('quick brown'))
511 self.s = univ.SequenceOf(componentType=univ.OctetString())
541 self.s = univ.SequenceOf(componentType=univ.OctetString())
572 s = univ.SetOf()
576 s = univ.SetOf()
577 s.setComponentByPosition(0, univ.OctetString('quick brown'))
581 s = univ.SetOf()
582 s.setComponentByPosition(0, univ.OctetString('quick brown'))
588 s = univ.SetOf()
589 s.setComponentByPosition(0, univ.OctetString('quick brown'))
595 s = univ.SetOf()
596 s.setComponentByPosition(0, univ.OctetString('quick brown'))
605 self.s = univ.SetOf(componentType=univ.OctetString())
609 s = univ.SetOf()
637 self.s = univ.SetOf(componentType=univ.OctetString())
669 self.s = univ.Sequence()
670 self.s.setComponentByPosition(0, univ.Null(''))
671 self.s.setComponentByPosition(1, univ.OctetString('quick brown'))
672 self.s.setComponentByPosition(2, univ.Integer(1))
696 self.s = univ.Sequence(
698 namedtype.NamedType('place-holder', univ.Null()),
699 namedtype.OptionalNamedType('first-name', univ.OctetString()),
700 namedtype.DefaultedNamedType('age', univ.Integer(33)),
746 {1: univ.Integer(),
747 2: univ.OctetString()}
749 self.s = univ.Sequence(
751 namedtype.NamedType('id', univ.Integer()),
752 namedtype.NamedType('blob', univ.Any(), openType=openType)
760 self.s[1] = univ.Integer(12)
770 self.s[1] = univ.OctetString('quick brown')
780 self.s[1] = univ.ObjectIdentifier('1.3.6')
792 self.s[1] = univ.ObjectIdentifier('1.3.6')
807 {1: univ.Integer(),
808 2: univ.OctetString()}
810 self.s = univ.Sequence(
812 namedtype.NamedType('id', univ.Integer()),
813 …namedtype.NamedType('blob', univ.Any().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFor…
821 self.s[1] = univ.Integer(12)
834 {1: univ.Integer(),
835 2: univ.OctetString()}
837 self.s = univ.Sequence(
839 namedtype.NamedType('id', univ.Integer()),
840 …namedtype.NamedType('blob', univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFor…
848 self.s[1] = univ.Integer(12)
858 self.s = univ.Sequence(
860 namedtype.NamedType('place-holder', univ.Null()),
861 namedtype.OptionalNamedType('first-name', univ.OctetString()),
862 namedtype.DefaultedNamedType('age', univ.Integer(33)),
882 self.s.setComponentByPosition(0, univ.Null(''))
883 self.s.setComponentByPosition(1, univ.OctetString('quick brown'))
884 self.s.setComponentByPosition(2, univ.Integer(1))
983 s = univ.Sequence(
985 namedtype.NamedType('number', univ.Integer()),
1009 self.s = univ.Sequence(
1011 …namedtype.NamedType('number', univ.Boolean().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.…
1029 self.s = univ.Set()
1030 self.s.setComponentByPosition(0, univ.Null(''))
1031 self.s.setComponentByPosition(1, univ.OctetString('quick brown'))
1032 self.s.setComponentByPosition(2, univ.Integer(1))
1056 self.s = univ.Set(
1058 namedtype.NamedType('place-holder', univ.Null()),
1059 namedtype.OptionalNamedType('first-name', univ.OctetString()),
1060 namedtype.DefaultedNamedType('age', univ.Integer(33)),
1103 self.s = univ.Set(
1105 namedtype.NamedType('place-holder', univ.Null()),
1106 namedtype.OptionalNamedType('first-name', univ.OctetString()),
1107 namedtype.DefaultedNamedType('age', univ.Integer(33)),
1127 self.s.setComponentByPosition(0, univ.Null(''))
1128 self.s.setComponentByPosition(1, univ.OctetString('quick brown'))
1129 self.s.setComponentByPosition(2, univ.Integer(1))
1227 s = univ.Choice()
1236 s = univ.Choice()
1237 s.setComponentByPosition(0, univ.Null(''))
1241 s = univ.Choice()
1242 s.setComponentByPosition(0, univ.OctetString('quick brown'))
1246 s = univ.Choice()
1247 s.setComponentByPosition(0, univ.OctetString('quick brown'))
1253 s = univ.Choice()
1254 s.setComponentByPosition(0, univ.OctetString('quick brown'))
1260 s = univ.Choice()
1261 s.setComponentByPosition(0, univ.OctetString('quick brown'))
1270 self.s = univ.Choice(
1272 namedtype.NamedType('place-holder', univ.Null('')),
1273 namedtype.NamedType('number', univ.Integer(0)),
1274 namedtype.NamedType('string', univ.OctetString())
1290 self.s = univ.Choice(
1292 namedtype.NamedType('place-holder', univ.Null('')),
1293 namedtype.NamedType('number', univ.Integer(0)),
1294 namedtype.NamedType('string', univ.OctetString())
1307 self.s.setComponentByPosition(0, univ.Null(''))
1314 s.setComponentByPosition(0, univ.Null(''))
1318 self.s.setComponentByPosition(2, univ.OctetString('abcdefgh'))
1326 s.setComponentByPosition(2, univ.OctetString('abcdefgh'))
1334 self.s = univ.Any(encoder.encode(univ.OctetString('fox')))
1355 self.s = univ.Any()
1356 self.v = encoder.encode(univ.OctetString('fox'))