Code example for MifareClassic

Methods: authenticateSectorWithKeyB

0
            if (!useAsKeyB) {
                // Key A. 
                return mMFC.authenticateSectorWithKeyA(sectorIndex, key);
            } else { 
                // Key B. 
                return mMFC.authenticateSectorWithKeyB(sectorIndex, key);
            } 
        } catch (IOException e) {
            Log.d(LOG_TAG, "Error while authenticate with tag.");
        } 
        return false; 
    } 
 
    /** 
     * Check if key B is readable. 
     * Key B is readable for the following configurations: 
     * <ul> 
     * <li>C1 = 0, C2 = 0, C3 = 0</li> 
     * <li>C1 = 0, C2 = 0, C3 = 1</li> 
     * <li>C1 = 0, C2 = 1, C3 = 0</li> 
     * </ul>