From 9470ebde11f85b176bf826c943a5d582e33bd01f Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Mon, 22 Feb 2016 00:01:45 -0800 Subject: [PATCH] add README.. [git-p4: depot-paths = "//depot/python/pypasn1/main/": change = 1835] --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3842a36 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +PASN1 +===== + +This is a simple library for doing marshalling of python objects that +uses a profile/subset of ASN.1. This library is not designed to be a +general ASN.1 parser, but designed to be super simple to use, and +secure. + +The following python types are supported: bool, int (and long), bytes, +null (as None), float, unicode, datetime, list, set and dict. If you +need to serialize other types/instances, a coerce function maybe +provided which is required to return the above string and an object +implementing the correct methods. See the ASN1Coder's __init__ +method's doc string for more information. + +ASN.1 has a number of different types of strings, but only UTF8String +is used by this library. In order to support dict types, it uses the +Private Constructed type 0. The contents are pairs of key value objects. +bytes (aka str in Python 2) is mapped to the octet string type. The +minimal encoding is used so that the same data will be encoded as the +same string, similar to the ASN.1 DER encoding.