Create a |ASN.1| object initialized from the hex string. Parameters ---------- value: :class:`str` Text string like 'DEADBEEF'
(value)
| 909 | |
| 910 | @staticmethod |
| 911 | def fromHexString(value): |
| 912 | """Create a |ASN.1| object initialized from the hex string. |
| 913 | |
| 914 | Parameters |
| 915 | ---------- |
| 916 | value: :class:`str` |
| 917 | Text string like 'DEADBEEF' |
| 918 | """ |
| 919 | r = [] |
| 920 | p = [] |
| 921 | for v in value: |
| 922 | if p: |
| 923 | r.append(int(p + v, 16)) |
| 924 | p = None |
| 925 | else: |
| 926 | p = v |
| 927 | if p: |
| 928 | r.append(int(p + '0', 16)) |
| 929 | |
| 930 | return bytes(r) |
| 931 | |
| 932 | # Immutable sequence object protocol |
| 933 |