@Kan_Li Thank you so much for your reply.
I tried using AESKey, but it looks like it is some kind of encryption technique to encrypt my secret data.
But I tell you what exactly I want to do:
1. I have some binary files stored on my smart card se050. I have put the read policy on them using the PIN (userID)
2. I want to use a simple PIN (just like we have in our phones, to unlock the phone), to unlock the card. And after unlocking, the user can read the binary files.
3. On the PIN (userID), i also used the MAX_ATTEMPS policy to limit the number of attempts. and once this limit is reached the PIN is locked.
4. Now, according to our requirement, the PIN(userID) should be unlocked again using PUK(userID).
And the PUK must also be used to change the PIN. (if user wants to change the PIN).
5. But, because we can't change the PIN, so we thought a work around, that we can delete a PIN, and then recreate a new PIN with the same identifier. (And this works fine)
6. Now, the problem is, if someone deletes the PIN, and then the power goes off. and then the unauthorized person access our device, and by any chance he creates the PIN with the same identifier. then he would be able to read our binary files.
Now, what should be the possible approach to implement this thing. If you can help, I shall be very thankful.
Have a great day!
Priyanka