Forum / MIFARE SDK / How to use UltralightC.authenticate funtion of Mifare SDK Lite
Tagged: authentication, Ultralight C
-
Hi,
I downloaded Mifare SDK Lite to handle Ultralight C type of NFC Tag.
But it's difficult for me to understand how to use authenticate function from the document of the SDK,
Because the explanation of the function is so simple like the below.
Would you please add some detail explanation about how to use it for Ultralight C Tag?
Thanks, Raphael
public void authenticate(int keyNo,
byte keyVersion)
throws IOException,
GeneralSecurityException,
SmartCardException
Complete authentication process. First call authenticateStep1 and then authenticateStep2 .
Parameters:
keyNo - The key to use for authentication.
keyVersion - keyVersion to use for authentication.
Throws:
IOException - Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
GeneralSecurityException - The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it
SmartCardException - Signals that an Desfire card related exception has occurred. or indicates operation with KeyStore is failed because of wrong parameters or any Security error.
+ 0 | - 0
Hey,
I think you should be just fine ignoring "
" andauthenticateStep1
.authenticatestep2
Just fill in your authentication key and version of that key
Best,
David
+ 1 | - 0
Thanks for your response.
1. There are no attached or linked code for authenticateStep1 and authenticateStep2 in Mifare SDK Lite.
2. I understand the key should have 16bytes size to fill from 0x2c to 0x2f of Ultralight C memory.
But the keyno in the parameter of authenticate is int type.
How can I pass 16 bytes through int type parameter?
Thanks, Raphael
+ 0 | - 0
I have the same question, How can I pass 16 bytes through int type parameter?
I hope someone can show some code for me , Thanks.
+ 0 | - 0
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.