mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 16:14:01 +02:00
Make the signature wrapped in JSON object to be able to extend structure later
This commit is contained in:
parent
d4a382ed2f
commit
cfe19b55a1
2 changed files with 16 additions and 3 deletions
|
@ -27,7 +27,9 @@ try:
|
|||
print "Got UID %s" % uid_hex
|
||||
signature = signUid(key, uid_hex.decode("hex"))
|
||||
(tempFd, tempFname) = tempfile.mkstemp(dir="/tmp")
|
||||
os.write(tempFd, signature)
|
||||
signatureJson = '{"brmdoorSignature": "%s"}' % signature.encode("hex")
|
||||
print "Writing signature JSON:", signatureJson
|
||||
os.write(tempFd, signatureJson)
|
||||
os.close(tempFd)
|
||||
print "Wrote signature into %s" % tempFname
|
||||
except NFCError, e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue