Skip to content
Snippets Groups Projects
Commit 975b9aed authored by developer29's avatar developer29
Browse files

BUGFIX: Desfire write and read data file

parent e3c5d350
Branches
No related merge requests found
...@@ -680,7 +680,7 @@ namespace uFR_AES_tester ...@@ -680,7 +680,7 @@ namespace uFR_AES_tester
UInt32 aid = Convert.ToUInt32(AIDCardAuth.Text, 16); UInt32 aid = Convert.ToUInt32(AIDCardAuth.Text, 16);
byte aid_key_nr_auth = Byte.Parse(AIDKeyNrAuth.Text); byte aid_key_nr_auth = Byte.Parse(AIDKeyNrAuth.Text);
byte file_id = Byte.Parse(FileIDForWork.Text); byte file_id = Byte.Parse(FileIDForWork.Text);
byte file_length = 0; UInt16 file_length = 0;
byte communication_settings = 0; byte communication_settings = 0;
byte[] file_data = new byte[10000]; byte[] file_data = new byte[10000];
...@@ -713,7 +713,7 @@ namespace uFR_AES_tester ...@@ -713,7 +713,7 @@ namespace uFR_AES_tester
sr.Close();*/ sr.Close();*/
file_data = File.ReadAllBytes(openDialog.FileName); file_data = File.ReadAllBytes(openDialog.FileName);
file_length = (byte)file_data.Length; file_length = (UInt16)file_data.Length;
} }
...@@ -744,7 +744,7 @@ namespace uFR_AES_tester ...@@ -744,7 +744,7 @@ namespace uFR_AES_tester
if (status == 0) if (status == 0)
{ {
StatusLabel.Text = "Operation completed"; StatusLabel.Text = "Operation completed";
StatusRTB.Text = "uFR_int_DesfireDeleteFile = " + uFCoder.status2str((uFR.DL_STATUS)status); StatusRTB.Text = "uFR_int_DesfireWriteStdDataFile = " + uFCoder.status2str((uFR.DL_STATUS)status);
if (card_status == (UInt16)DESFIRE_CARD_STATUS_CODES.CARD_OPERATION_OK) if (card_status == (UInt16)DESFIRE_CARD_STATUS_CODES.CARD_OPERATION_OK)
{ {
...@@ -760,7 +760,7 @@ namespace uFR_AES_tester ...@@ -760,7 +760,7 @@ namespace uFR_AES_tester
else else
{ {
StatusLabel.Text = uFCoder.status2str((uFR.DL_STATUS)status); StatusLabel.Text = uFCoder.status2str((uFR.DL_STATUS)status);
StatusRTB.Text = "uFR_int_DesfireDeleteFile" + uFCoder.status2str((uFR.DL_STATUS)status) + StatusRTB.Text = "uFR_int_DesfireWriteStdDataFile" + uFCoder.status2str((uFR.DL_STATUS)status) +
"\nExecution time : " + exec_time.ToString() + " ms"; "\nExecution time : " + exec_time.ToString() + " ms";
} }
} }
...@@ -1229,7 +1229,7 @@ namespace uFR_AES_tester ...@@ -1229,7 +1229,7 @@ namespace uFR_AES_tester
UInt16 exec_time; UInt16 exec_time;
byte file_id = Byte.Parse(FileIDForWork.Text); byte file_id = Byte.Parse(FileIDForWork.Text);
byte aid_key_nr_auth = Byte.Parse(AIDKeyNrAuth.Text); byte aid_key_nr_auth = Byte.Parse(AIDKeyNrAuth.Text);
byte file_length = Byte.Parse(FileLength.Text); UInt16 file_length = UInt16.Parse(FileLength.Text);
byte communication_settings = 0; byte communication_settings = 0;
byte[] data = new byte[10000]; byte[] data = new byte[10000];
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment