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
javacardx.crypto package / jcdk 2.1.1
-
- Posts: 1
- Joined: Thu Sep 22, 2016 4:25 am
- Points :54
- Contact:
javacardx.crypto package / jcdk 2.1.1
hi:
I'm devolping a java card applet with the jcdk 2.1.1. I can install some applets on the card and now I try to use the Cipher class and the KeyEncryption interface in package javacardx.crypto. But in the documentation I found that its in an optional package and not in the jcdk included. Where can I find crypto packages?and how to use it?
Thanks in advance!!!!
I'm devolping a java card applet with the jcdk 2.1.1. I can install some applets on the card and now I try to use the Cipher class and the KeyEncryption interface in package javacardx.crypto. But in the documentation I found that its in an optional package and not in the jcdk included. Where can I find crypto packages?and how to use it?
Thanks in advance!!!!
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3053
- Contact:
Re: javacardx.crypto package / jcdk 2.1.1
It is only one interface.
You need to check if the class Key implements this interface.
Here's one piece of source code for its usage:
You need to check if the class Key implements this interface.
Here's one piece of source code for its usage:
Code: Select all
// The last parameter of method KeyBuilder.buildKey is true, means the built key implements the Encryption interface;
// If key encryption interface is not supported, this method throws exception: CryptoException.NO_SUCH_ALGORITHM;
aesKeyEncryption = (AESKey) KeyBuilder.buildKey(keyType, KeyBuilder.LENGTH_AES_128, true);
if (!(aesKeyEncryption instanceof KeyEncryption)) {
// Throw exception;
// return;
}
// aesKeyEncryption.setKeyCipher(...);
// aesKeyEncryption.getKeyCipher();
sense and simplicity
Who is online
Users browsing this forum: No registered users and 14 guests