
may be it´s not the subject of the forum but i got a question to Mifare DESFire.
I try to create a Standard-Data-File in my Application but get
"Crypto Processing Error in RF-Communication"
I´m using OBIDISC4NET from Feig.
(There is also a 4J version maybe someone has worked with it)
My code:
Code: Select all
byte[] output;
byte AES = 1 << 7;
byte NUMBER_OF_KEYS = 7;
byte ACCESS_NEVER = 0xF;
byte ACCESS_EVER = 0xE;
byte keySettings1 = 0x0B;
byte keySettings2 = (byte)(AES | NUMBER_OF_KEYS);
var creationState = DESFire.IFlexSoftCrypto.CreateApplication(0, 0xf88980, keySettings1, keySettings2, 0, "");
byte applicationLevelFlags = 0;
byte fileNumber = 0;
byte fileCommunactionSettings = 3;
byte fileChangeAccess = 0x00;
byte fileReadAccess = 0x10;
byte fileWriteAccess = ACCESS_NEVER;
byte fileReadWriteAccess = (byte)(ACCESS_NEVER << 4);
byte fileSize = 32;
var selectState = DESFire.IFlexSoftCrypto.SelectApplication(0, 0xf88980);
var fileState = DESFire.IFlexSoftCrypto
.CreateStdDataFile(applicationLevelFlags, fileNumber, 0, fileCommunactionSettings, fileReadWriteAccess,
fileChangeAccess, fileReadAccess, fileWriteAccess, fileSize);