particionado
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,24 @@
|
||||
Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,230 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: pyasn1
|
||||
Version: 0.5.0
|
||||
Summary: Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)
|
||||
Home-page: https://github.com/pyasn1/pyasn1
|
||||
Author: Ilya Etingof
|
||||
Author-email: etingof@gmail.com
|
||||
Maintainer: pyasn1 maintenance organization
|
||||
Maintainer-email: Christian Heimes <christian@python.org>
|
||||
License: BSD-2-Clause
|
||||
Project-URL: Documentation, https://pyasn1.readthedocs.io
|
||||
Project-URL: Source, https://github.com/pyasn1/pyasn1
|
||||
Project-URL: Issues, https://github.com/pyasn1/pyasn1/issues
|
||||
Project-URL: Changelog, https://pyasn1.readthedocs.io/en/latest/changelog.html
|
||||
Platform: any
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Console
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Intended Audience :: Education
|
||||
Classifier: Intended Audience :: Information Technology
|
||||
Classifier: Intended Audience :: System Administrators
|
||||
Classifier: Intended Audience :: Telecommunications Industry
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Natural Language :: English
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Communications
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7
|
||||
Description-Content-Type: text/markdown
|
||||
License-File: LICENSE.rst
|
||||
|
||||
|
||||
ASN.1 library for Python
|
||||
------------------------
|
||||
[](https://pypi.org/project/pyasn1)
|
||||
[](https://pypi.org/project/pyasn1/)
|
||||
[](https://github.com/pyasn1/pyasn1/actions/workflows/main.yml)
|
||||
[](https://codecov.io/github/pyasn1/pyasn1)
|
||||
[](https://raw.githubusercontent.com/pyasn1/pyasn1/master/LICENSE.txt)
|
||||
|
||||
This is a free and open source implementation of ASN.1 types and codecs
|
||||
as a Python package. It has been first written to support particular
|
||||
protocol (SNMP) but then generalized to be suitable for a wide range
|
||||
of protocols based on
|
||||
[ASN.1 specification](https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.208-198811-W!!PDF-E&type=items).
|
||||
|
||||
**NOTE:** The package is now maintained by *Christian Heimes* and
|
||||
*Simon Pichugin* in project https://github.com/pyasn1/pyasn1.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Generic implementation of ASN.1 types (X.208)
|
||||
* Standards compliant BER/CER/DER codecs
|
||||
* Can operate on streams of serialized data
|
||||
* Dumps/loads ASN.1 structures from Python types
|
||||
* 100% Python, works with Python 2.7 and 3.6+
|
||||
* MT-safe
|
||||
* Contributed ASN.1 compiler [Asn1ate](https://github.com/kimgr/asn1ate)
|
||||
|
||||
Why using pyasn1
|
||||
----------------
|
||||
|
||||
ASN.1 solves the data serialisation problem. This solution was
|
||||
designed long ago by the wise Ancients. Back then, they did not
|
||||
have the luxury of wasting bits. That is why ASN.1 is designed
|
||||
to serialise data structures of unbounded complexity into
|
||||
something compact and efficient when it comes to processing
|
||||
the data.
|
||||
|
||||
That probably explains why many network protocols and file formats
|
||||
still rely on the 30+ years old technology. Including a number of
|
||||
high-profile Internet protocols and file formats.
|
||||
|
||||
Quite a number of books cover the topic of ASN.1.
|
||||
[Communication between heterogeneous systems](http://www.oss.com/asn1/dubuisson.html)
|
||||
by Olivier Dubuisson is one of those high quality books freely
|
||||
available on the Internet.
|
||||
|
||||
The pyasn1 package is designed to help Python programmers tackling
|
||||
network protocols and file formats at the comfort of their Python
|
||||
prompt. The tool struggles to capture all aspects of a rather
|
||||
complicated ASN.1 system and to represent it on the Python terms.
|
||||
|
||||
How to use pyasn1
|
||||
-----------------
|
||||
|
||||
With pyasn1 you can build Python objects from ASN.1 data structures.
|
||||
For example, the following ASN.1 data structure:
|
||||
|
||||
```bash
|
||||
Record ::= SEQUENCE {
|
||||
id INTEGER,
|
||||
room [0] INTEGER OPTIONAL,
|
||||
house [1] INTEGER DEFAULT 0
|
||||
}
|
||||
```
|
||||
|
||||
Could be expressed in pyasn1 like this:
|
||||
|
||||
```python
|
||||
class Record(Sequence):
|
||||
componentType = NamedTypes(
|
||||
NamedType('id', Integer()),
|
||||
OptionalNamedType(
|
||||
'room', Integer().subtype(
|
||||
implicitTag=Tag(tagClassContext, tagFormatSimple, 0)
|
||||
)
|
||||
),
|
||||
DefaultedNamedType(
|
||||
'house', Integer(0).subtype(
|
||||
implicitTag=Tag(tagClassContext, tagFormatSimple, 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
It is in the spirit of ASN.1 to take abstract data description
|
||||
and turn it into a programming language specific form.
|
||||
Once you have your ASN.1 data structure expressed in Python, you
|
||||
can use it along the lines of similar Python type (e.g. ASN.1
|
||||
`SET` is similar to Python `dict`, `SET OF` to `list`):
|
||||
|
||||
```python
|
||||
>>> record = Record()
|
||||
>>> record['id'] = 123
|
||||
>>> record['room'] = 321
|
||||
>>> str(record)
|
||||
Record:
|
||||
id=123
|
||||
room=321
|
||||
>>>
|
||||
```
|
||||
|
||||
Part of the power of ASN.1 comes from its serialisation features. You
|
||||
can serialise your data structure and send it over the network.
|
||||
|
||||
```python
|
||||
>>> from pyasn1.codec.der.encoder import encode
|
||||
>>> substrate = encode(record)
|
||||
>>> hexdump(substrate)
|
||||
00000: 30 07 02 01 7B 80 02 01 41
|
||||
```
|
||||
|
||||
Conversely, you can turn serialised ASN.1 content, as received from
|
||||
network or read from a file, into a Python object which you can
|
||||
introspect, modify, encode and send back.
|
||||
|
||||
```python
|
||||
>>> from pyasn1.codec.der.decoder import decode
|
||||
>>> received_record, rest_of_substrate = decode(substrate, asn1Spec=Record())
|
||||
>>>
|
||||
>>> for field in received_record:
|
||||
>>> print('{} is {}'.format(field, received_record[field]))
|
||||
id is 123
|
||||
room is 321
|
||||
house is 0
|
||||
>>>
|
||||
>>> record == received_record
|
||||
True
|
||||
>>> received_record.update(room=123)
|
||||
>>> substrate = encode(received_record)
|
||||
>>> hexdump(substrate)
|
||||
00000: 30 06 02 01 7B 80 01 7B
|
||||
```
|
||||
|
||||
The pyasn1 classes struggle to emulate their Python prototypes (e.g. int,
|
||||
list, dict etc.). But ASN.1 types exhibit more complicated behaviour.
|
||||
To make life easier for a Pythonista, they can turn their pyasn1
|
||||
classes into Python built-ins:
|
||||
|
||||
```python
|
||||
>>> from pyasn1.codec.native.encoder import encode
|
||||
>>> encode(record)
|
||||
{'id': 123, 'room': 321, 'house': 0}
|
||||
```
|
||||
|
||||
Or vice-versa -- you can initialize an ASN.1 structure from a tree of
|
||||
Python objects:
|
||||
|
||||
```python
|
||||
>>> from pyasn1.codec.native.decoder import decode
|
||||
>>> record = decode({'id': 123, 'room': 321, 'house': 0}, asn1Spec=Record())
|
||||
>>> str(record)
|
||||
Record:
|
||||
id=123
|
||||
room=321
|
||||
>>>
|
||||
```
|
||||
|
||||
With ASN.1 design, serialisation codecs are decoupled from data objects,
|
||||
so you could turn every single ASN.1 object into many different
|
||||
serialised forms. As of this moment, pyasn1 supports BER, DER, CER and
|
||||
Python built-ins codecs. The extremely compact PER encoding is expected
|
||||
to be introduced in the upcoming pyasn1 release.
|
||||
|
||||
More information on pyasn1 APIs can be found in the
|
||||
[documentation](https://pyasn1.readthedocs.io/en/latest/pyasn1/contents.html),
|
||||
compiled ASN.1 modules for different protocols and file formats
|
||||
could be found in the pyasn1-modules
|
||||
[repo](https://github.com/pyasn1/pyasn1-modules).
|
||||
|
||||
How to get pyasn1
|
||||
-----------------
|
||||
|
||||
The pyasn1 package is distributed under terms and conditions of 2-clause
|
||||
BSD [license](https://pyasn1.readthedocs.io/en/latest/license.html). Source code is freely
|
||||
available as a GitHub [repo](https://github.com/pyasn1/pyasn1).
|
||||
|
||||
You could `pip install pyasn1` or download it from [PyPI](https://pypi.org/project/pyasn1).
|
||||
|
||||
If something does not work as expected,
|
||||
[open an issue](https://github.com/epyasn1/pyasn1/issues) at GitHub or
|
||||
post your question [on Stack Overflow](https://stackoverflow.com/questions/ask)
|
||||
or try browsing pyasn1
|
||||
[mailing list archives](https://sourceforge.net/p/pyasn1/mailman/pyasn1-users/).
|
||||
|
||||
Copyright (c) 2005-2020, [Ilya Etingof](mailto:etingof@gmail.com).
|
||||
All rights reserved.
|
||||
@@ -0,0 +1,73 @@
|
||||
pyasn1-0.5.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
pyasn1-0.5.0.dist-info/LICENSE.rst,sha256=Kq1fwA9wXEoa3bg-7RCmp10oajd58M-FGdh-YrxHNf0,1334
|
||||
pyasn1-0.5.0.dist-info/METADATA,sha256=iq3UB4Dv0FyjRSrYuEhV7FLZEqO-9GvlCs4nqGU6PyU,8535
|
||||
pyasn1-0.5.0.dist-info/RECORD,,
|
||||
pyasn1-0.5.0.dist-info/WHEEL,sha256=a-zpFRIJzOq5QfuhBzbhiA1eHTzNCJn8OdRvhdNX0Rk,110
|
||||
pyasn1-0.5.0.dist-info/top_level.txt,sha256=dnNEQt3nIDIO5mSCCOB5obQHrjDOUsRycdBujc2vrWE,7
|
||||
pyasn1-0.5.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
||||
pyasn1/__init__.py,sha256=1GVPRSnBiHgJv4NB6EAdnpzyUyHjl1oqBMnlgnUBuGE,66
|
||||
pyasn1/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/__pycache__/debug.cpython-311.pyc,,
|
||||
pyasn1/__pycache__/error.cpython-311.pyc,,
|
||||
pyasn1/codec/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/codec/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/codec/__pycache__/streaming.cpython-311.pyc,,
|
||||
pyasn1/codec/ber/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/codec/ber/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/codec/ber/__pycache__/decoder.cpython-311.pyc,,
|
||||
pyasn1/codec/ber/__pycache__/encoder.cpython-311.pyc,,
|
||||
pyasn1/codec/ber/__pycache__/eoo.cpython-311.pyc,,
|
||||
pyasn1/codec/ber/decoder.py,sha256=nS_YzTHL-31XSp52JkxhN6ZUbCCT7OeYPjVjIo2OIrM,73211
|
||||
pyasn1/codec/ber/encoder.py,sha256=2msIEbl7_rl8T-cZIdBAzMgVKs6mh4lxNVjSXIxTusY,28630
|
||||
pyasn1/codec/ber/eoo.py,sha256=dspLKc2xr_W5Tbcr2WcfLd_bJLhOjotq1YxKn3DCQNI,639
|
||||
pyasn1/codec/cer/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/codec/cer/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/codec/cer/__pycache__/decoder.cpython-311.pyc,,
|
||||
pyasn1/codec/cer/__pycache__/encoder.cpython-311.pyc,,
|
||||
pyasn1/codec/cer/decoder.py,sha256=BokrzMSZ9NXBjklrP-BJk6zxf_EqOrYAYot3MjS0Kkk,4498
|
||||
pyasn1/codec/cer/encoder.py,sha256=T1wyJZKTHJg_hDaBUEzdtyMI7f4F9-SBnwzhfXaNN3Y,9673
|
||||
pyasn1/codec/der/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/codec/der/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/codec/der/__pycache__/decoder.cpython-311.pyc,,
|
||||
pyasn1/codec/der/__pycache__/encoder.cpython-311.pyc,,
|
||||
pyasn1/codec/der/decoder.py,sha256=eLc7DTCvpGQJDk-fvz6X7ydDywSGiw8ZrAn03_HqF_o,3287
|
||||
pyasn1/codec/der/encoder.py,sha256=Vu1c5UQWlRIHzY94dbdMRUxwEdoFuCOw56XBFYOnQNo,3338
|
||||
pyasn1/codec/native/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/codec/native/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/codec/native/__pycache__/decoder.cpython-311.pyc,,
|
||||
pyasn1/codec/native/__pycache__/encoder.cpython-311.pyc,,
|
||||
pyasn1/codec/native/decoder.py,sha256=athvwQtkoxljiwiKaACmd-Q5JJFYDMgDrnyjtXQ-98M,8814
|
||||
pyasn1/codec/native/encoder.py,sha256=uFV1BUM0osDlyBJnbkyLdPfS4oWTvRiIfYpRbg70bf4,8614
|
||||
pyasn1/codec/streaming.py,sha256=yD1-mMxpLZ63w5GjvB9cuvbQS-92qv6Po5tZzjMpGMo,6664
|
||||
pyasn1/compat/__init__.py,sha256=-9FOJV1STFBatf2pVRiOYn14GmCKC8RY3TYCxOqfRXY,112
|
||||
pyasn1/compat/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/compat/__pycache__/integer.cpython-311.pyc,,
|
||||
pyasn1/compat/__pycache__/octets.cpython-311.pyc,,
|
||||
pyasn1/compat/integer.py,sha256=cd7Uh3_qVI4ljcNbyfS9eNAF8vR0ht_8CiYN4O4AzMU,2828
|
||||
pyasn1/compat/octets.py,sha256=0dX8ZwQWOXAlo4ZRfhxrGpdFOPpBmeMdb_xAHwty2m0,1372
|
||||
pyasn1/debug.py,sha256=li6XRxEG7tNKy_O3WuO0SbkUXg5ij3L79o-AIIXeOCk,3548
|
||||
pyasn1/error.py,sha256=e352oqW33seeh2MbIF27sFSgpiegjstabCMFx2piR0M,3258
|
||||
pyasn1/type/__init__.py,sha256=EEDlJYS172EH39GUidN_8FbkNcWY9OVV8e30AV58pn0,59
|
||||
pyasn1/type/__pycache__/__init__.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/base.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/char.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/constraint.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/error.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/namedtype.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/namedval.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/opentype.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/tag.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/tagmap.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/univ.cpython-311.pyc,,
|
||||
pyasn1/type/__pycache__/useful.cpython-311.pyc,,
|
||||
pyasn1/type/base.py,sha256=p_bFpRRC4IurPrJo1nIVECDJFe1gA24J1VbriHgTkTM,22331
|
||||
pyasn1/type/char.py,sha256=MUEkwKpQXZglvKjPvoLXQp2wCF7jw9aih8KskKdWEHw,11410
|
||||
pyasn1/type/constraint.py,sha256=fv6vN3X5b5IrDXt1BjpSPzzPxAsgQUl197fcwQoisNw,22145
|
||||
pyasn1/type/error.py,sha256=2kwYYkbd2jXIVEE56ThLRmBEOGZfafwogEOo-9RV_GY,259
|
||||
pyasn1/type/namedtype.py,sha256=_nM-z7hTTk-sk2pHxeDXDah64Z2FoBEnkmDPilFneNo,16381
|
||||
pyasn1/type/namedval.py,sha256=84u6wKOfte7U47aWrFqIZRM3tO2ryivpsBqVblPezuc,4899
|
||||
pyasn1/type/opentype.py,sha256=jjqSbTgAaCxlSHSf66YcLbrxtfh_98nAx2v8wzW35MU,2861
|
||||
pyasn1/type/tag.py,sha256=8B0RUQkI-Oe4DZXAe-0qT1mbcpVx18ms19aYQ1USzdI,9499
|
||||
pyasn1/type/tagmap.py,sha256=tceWe3eWMVHodbOG3dNgEiUP0jHb1-2YKr_r75qxdH4,3011
|
||||
pyasn1/type/univ.py,sha256=lRuM3poXYmJDx-luqDuMT_mxOtxg0mkRDfOfNSpkFSQ,108548
|
||||
pyasn1/type/useful.py,sha256=-J7ej0hqdjF29h150dtNmIIcGcMBg_y-nKqcozvk-48,5284
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.40.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pyasn1
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user