diff options
| author | Nick Pelly <npelly@google.com> | 2011-01-21 22:11:29 -0800 |
|---|---|---|
| committer | Nick Pelly <npelly@google.com> | 2011-01-23 21:32:57 -0800 |
| commit | e45083b11bef915f713379fb4106dd2ebd897d03 (patch) | |
| tree | 4035d2404621c0ddc9002eb59233b7c5fa5d0ead /tools/aapt2/diff/Diff.cpp | |
| parent | dc54a8c742e96d6ea8ef3e18c0f2ee1235899599 (diff) | |
Make MifareClassic methods more consistent.
Remove method overloading for combinations of sector+block addressing.
Instead provide methods that more closly match the raw commands, and more
efficient helpers to convert between blocks and sectors.
o fix off-by-one bug in getBlockCountInSector()
o add BLOCK_SIZE
o remove DESFIRE not operating in classic emulation (SAK 0x20)
o hide isEmulated(), there is no use case, and the info is available elsewhere
o getTotalBlockCount() -> getBlockCount()
o getBlockCount(int) -> getBlockCountInSector(int)
o introduce blockToSector() and sectorToBlock()
o remove authenticateBlock()
make it really clear that authentication is per sector, and reduce function
explosion. blockToSector() allows you to use authenticateSector...
o explicit authenticateSectorWithKeyA() / authenticateSectorWithKeyB()
get rid of magic boolean
o remove all (int sector, int block) parameters
always address by absolute block. this makes the API crystal clear, and
helps reduce function explosion
o validation of all sector and block indices
o dont & 0xff when converting to byte - its redundant
o Remove TYPE_OTHER. Mifare Classic types are well-known and stable.
Change-Id: I3c9f8254ff307f31b388b3d7592c862d5de6afa5
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions
