Page 1 of 1

can't install Applet successfully

Posted: Tue Oct 25, 2016 2:00 am
by Jpita
I got stuck in a strange problem. I always failed to install my applet no matter in JCIDE simulator or in real card.
But I found that when I annotated this code line, it can run w/o any problem.

Code: Select all

HMACKey hmacKey = (HMACKey) KeyBuilder.buildKey(KeyBuilder.TYPE_HMAC,KeyBuilder.LENGTH_HMAC_SHA_1_BLOCK_64, false);

Does this line have any problem?

Re: can't install Applet successfully

Posted: Tue Oct 25, 2016 2:59 am
by chico0609
It might be because either JCIDE simulator or your real card doesn't support the algorithm or key size.

Re: can't install Applet successfully

Posted: Tue Oct 25, 2016 4:23 am
by popmun09
JCIDE doesn't support HMAC. You can use SHA1 instead.

Re: can't install Applet successfully

Posted: Tue Oct 25, 2016 10:00 pm
by Jpita
popmun09 wrote:JCIDE doesn't support HMAC. You can use SHA1 instead.


Can you show me a sample code of SHA1? If any example exists, I would be greatly appreciated.