JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
Moderator: UNKNwYSHSA
Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
My javacard version is JC2.2.1 for which signature class doesn't include ALG_HMAC_SHA1 method. To my best knowledge, it includes this method after JC2.2.2. So is it possible to use this method without upgrading my card JC version?
- horse dream
- Posts: 76
- Joined: Thu May 21, 2015 11:48 pm
- Points :140
- Contact:
Re: Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
You could just use the value that you find in the JC2.2.2 version for the constant ALG_HMAC_SHA1 (= (byte)24) and pass it to the Signature.getInstance() method. So using the value is not a problem. However, the smartcard must support this algorithm in order for you to be able to use.
Re: Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
horse dream wrote:You could just use the value that you find in the JC2.2.2 version for the constant ALG_HMAC_SHA1 (= (byte)24) and pass it to the Signature.getInstance() method. So using the value is not a problem. However, the smartcard must support this algorithm in order for you to be able to use.
@horse dream , Thanks for your reply. But how do I know whether my smartcard supports it?
- horse dream
- Posts: 76
- Joined: Thu May 21, 2015 11:48 pm
- Points :140
- Contact:
Re: Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
sakkiotto wrote:@horse dream , Thanks for your reply. But how do I exactly know whether my smartcard supports it?
If your smartcard supports JC 2.2.1, calling the getInstance() method with the value of ALG_HMAC_SHA1 will typically cause a CryptoException with reason (CryptoException.NO_SUCH_ALGORITHM) indicating that the algorithm is not supported.
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Is it possible to use ALG_HMAC_SHA1 in JC2.2.1?
The specification JC API v222 describes the function: Signature.getInstance(), and the exceptions it throws.
JC222 API Signature.getInstance()
JC222 API Signature.getInstance()
sense and simplicity
Who is online
Users browsing this forum: No registered users and 21 guests