| | |
| | | |
| | | import com.dayu.baselibrary.bean.BaseUserCardCard; |
| | | import com.dayu.baselibrary.tools.HexUtil; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | import java.io.IOException; |
| | | |
| | |
| | | |
| | | private static NativeNfcWriteHelper helper; |
| | | |
| | | public NativeNfcWriteHelper(Intent intent, Activity activity) { |
| | | } |
| | | |
| | | public void setIntent(Intent intent) { |
| | | this.tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); |
| | |
| | | */ |
| | | public static NativeNfcWriteHelper getInstence(Intent intent, Activity activity) { |
| | | if (helper == null) { |
| | | helper = new NativeNfcWriteHelper(intent, activity); |
| | | helper = new NativeNfcWriteHelper(); |
| | | } |
| | | helper.setIntent(intent); |
| | | return helper; |
| | |
| | | } |
| | | } else if (listA_PS.size() != 0 && listA_PS.size() > a) { |
| | | if (mfc.authenticateSectorWithKeyA(a, defauleKey)){ |
| | | changePasword(a, mfc); |
| | | isOpen = true; |
| | | |
| | | }else if (mfc.authenticateSectorWithKeyA(a, listA_PS.get(a))) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | public boolean changePasword(int a,byte[] passWord, MifareClassic mfc) { |
| | | try { |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 初始化卡 |
| | | * |