Reply To: setkey question

Forum MIFARE SDK setkey question Reply To: setkey question

Re: setkey question

2. June 2015 at 16:17
For the Advanced library you use only 4 parameters:

(int, byte KeyVersion, KeyType, newKey)

The KEY_DEFAULT_1 is probably the new Key, which can be whatever you come up with (I think it is 6 bytes long in my case).
You can set up more KEYs in KeyStore, and different Types. I use in my case MIFARE type Key, it's easiest but probably not the most secured.
Later, you will authenticate using one of those keys, reffering to them with the integer (keyNumber), which you also enter here as one of the parameters.

Just put for example:

byte[] KEY_DEFAULT_1 = {(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF};

And it should work.

Best,
David
+ 0  |  - 0