Indicate if this |ASN.1| object is a prefix of other |ASN.1| object. Parameters ---------- other: |ASN.1| object |ASN.1| object Returns ------- : :class:`bool` :obj:`True` if this |ASN.1| object is a parent (e.g. prefix) of th
(self, other)
| 1107 | return self._value.index(suboid) |
| 1108 | |
| 1109 | def isPrefixOf(self, other): |
| 1110 | """Indicate if this |ASN.1| object is a prefix of other |ASN.1| object. |
| 1111 | |
| 1112 | Parameters |
| 1113 | ---------- |
| 1114 | other: |ASN.1| object |
| 1115 | |ASN.1| object |
| 1116 | |
| 1117 | Returns |
| 1118 | ------- |
| 1119 | : :class:`bool` |
| 1120 | :obj:`True` if this |ASN.1| object is a parent (e.g. prefix) of the other |ASN.1| object |
| 1121 | or :obj:`False` otherwise. |
| 1122 | """ |
| 1123 | l = len(self) |
| 1124 | if l <= len(other): |
| 1125 | if self._value[:l] == other[:l]: |
| 1126 | return True |
| 1127 | return False |
| 1128 | |
| 1129 | def prettyIn(self, value): |
| 1130 | if isinstance(value, ObjectIdentifier): |
nothing calls this directly
no outgoing calls
no test coverage detected