summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2012-06-05 19:58:19 +0200
committerDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 21:16:46 -0700
commit5a0ee14e9904335cb90c0dd7a4e10f1523435c52 (patch)
treee4f4c2e8b07b6bccb955912bb3e8a302e5ccaf0a /setup.py
parentaf9b41cc4b0a58dd87f56e334a8d478f238f074d (diff)
downloadpycrypto-5a0ee14e9904335cb90c0dd7a4e10f1523435c52.tar.gz
Refactoring of the asn1 module
The following changes are included: - Decoding is a much simpler operation. The internal logic is based on stream of binary data, and not on string indexing anymore. Additionally, decoding used to look like this: bitmap = DerObject() bitmap.decode(input_buffer, True) if bitmap.isType('BIT STRING'): ... proceed with parsing ... else: ... error ... Whereas now, it is cleaner and more compact: bitmap = DerBitString() bitmap.decode(input_buffer) Any error condition will lead to an exception. - isType() method has been removed because of the above. - Added examples and documentation - Added support IMPLICIT tags - Added support for negative INTEGERs - Added DerSetOf ASN.1 class - DerObjectID can be initialized from the dotted representation of the Object ID. - DerBitString has a new member 'value' to hold the binary string. The member 'payload' should not be accessed anymore. - DerObjectID has a new member 'value' to hold the dotted representation of the Object ID string. The member 'payload' should not be accessed anymore. - Added operator += to DER SEQUENCE. Now it is possible to do: my_str = DerOctetString(b'ZYZ') seq = DerSequence() seq += 0 seq += my_str.encode() - Update to test cases
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions