This commit is contained in:
Michele Balistreri 2019-07-15 15:24:56 +03:00
parent 4703e6061f
commit ed485589ac
2 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,5 @@
enum AppInfoTag: UInt8 {
case template = 0x04
case template = 0xA4
case pubKey = 0x80
case uid = 0x8f
case keyUID = 0x8e

View File

@ -0,0 +1,17 @@
enum AppStatusTag: UInt8 {
case template = 0xA3
}
struct ApplicationStatus {
let pinRetryCount: Int
let pukRetryCount: Int
let hasMasterKey: Bool
init(_ data: [UInt8]) throws {
let tlv = TinyBERTLV(data)
_ = try tlv.enterConstructed(tag: AppStatusTag.template.rawValue)
pinRetryCount = try tlv.readInt()
pukRetryCount = try tlv.readInt()
hasMasterKey = try tlv.readBoolean()
}
}