Code example for MifareClassic

Methods: authenticateSectorWithKeyB

0
	} 
 
	public boolean setKeyB(Integer sector, byte[] key) {
		boolean auth = false;
		try { 
			auth = mf.authenticateSectorWithKeyB(sector, key);
		} catch (IOException e) {
			return auth;
		} 
		if (auth) {
			keysB[sector] = key;
		} 
		return auth;
	} 
 
	public byte[] bruteForceKeyA(Integer sector, Integer level) {
		try { 
			keysA[sector] = bruteForceKeys(sector, level, true);
		} catch (IOException e) {
			return null; 
		}