diff options
author | Henryk Plötz <henryk@ploetzli.ch> | 2010-06-01 03:05:19 +0200 |
---|---|---|
committer | Henryk Plötz <henryk@ploetzli.ch> | 2010-06-01 03:05:19 +0200 |
commit | 59917271ddf84ed0d2c05041408b299f2634a488 (patch) | |
tree | 06b1b156b40e992c6f30967bcf850acdc4be809b | |
parent | 5baedf1e8eec4f08f7721b2f5272e6a2c912aec1 (diff) |
Add Raw_APDU class for unparsed and nonjudgmental data transmission
-rw-r--r-- | utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -458,6 +458,20 @@ class R_APDU(APDU): "Return this APDU as a binary string" return self.data + self.sw +class Raw_APDU(APDU): + """Raw APDU that doesn't do any parsing""" + + def parse(self, apdu): + "'Parse' the apdu and copy the values to this object" + self.data = apdu + + def render(self): + "Return this APDU as a binary string" + return self.data + + def _format_fields(self): + return "" + class PN532_Frame(APDU): """This is not really an ISO 7816 APDU, but close enough to use the same class infrastructure.""" |