Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pskc/key.py
Commit message (Collapse)AuthorAgeFilesLines
* Support Python 3Arthur de Jong2015-10-061-2/+5
| | | | | | | | This enables support for Python 3 together with Python 2 support with a single codebase. On Python 3 key data is passed around as bytestrings which makes the doctests a little harder to maintain across Python versions.
* Rename pskc.parse to pskc.xmlArthur de Jong2014-10-091-4/+4
| | | | | | | This renames the parse module to xml to better reflect the purpose of the module and it's functions. This also introduces a parse() function that wraps etree.parse().
* Construct XML document with basic PKSC informationArthur de Jong2014-06-281-0/+75
| | | | | | This introduces make_xml() functions to build an XML document that contains the basic PSKC information and keys. This currently only supports writing unencrypted PSKC files.
* Simplify DataType value handlingArthur de Jong2014-06-271-38/+32
| | | | | | | Only store the native value of the property, not the text representation. This also results in the BinaryDataType and IntegerDataType subclasses only needing from_text() and from_bin() functions.
* Refactor out some functions to parseArthur de Jong2014-06-151-16/+6
| | | | | This introduces the getint() and getbool() functions in parse to avoid some code duplication.
* Add support for setting secretArthur de Jong2014-06-151-24/+39
| | | | | | This supports setters for the secret, counter, time_offset, time_interval and time_drift properties. Setting these values stores the values unencrypted internally.
* Raise exception when MAC validation failsArthur de Jong2014-06-141-16/+15
| | | | | | | | | This changes the way the check() function works to raise an exception when the MAC is not correct. The MAC is also now always checked before attempting decryption. This also renames the internal DataType.value property to a get_value() method for clarity.
* Have parse module provide find() functionsArthur de Jong2014-06-141-43/+39
| | | | | | | | This changes the parse module functions to better match the ElementTree API and extends it with findint(), findtime() and findbin(). It also passes the namespaces to all calls that require it without duplicating this throughout the normal code.
* Use get() instead of attrib.get() (shorter)Arthur de Jong2014-06-141-19/+19
|
* Add a function for adding a new keyArthur de Jong2014-05-251-1/+1
|
* Code simplificationArthur de Jong2014-05-251-9/+5
|
* Fix attribute name in docstringArthur de Jong2014-05-191-1/+1
|
* Provide pskc.key docstringsArthur de Jong2014-04-191-47/+114
| | | | | | | | | This documents most of the information that is available per key and adds a few other minor cosmetic changes. This also re-organises the key properties to be in a slightly more logical order and renames the userid key property to key_userid to more clearly distinguish it from device_userid.
* Move Key class to separate moduleArthur de Jong2014-04-191-0/+232
This also allows re-organising the imports a bit.