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
Convert Object to byte[] in Java Card
-
- Posts: 27
- Joined: Mon Sep 28, 2015 2:31 am
- Points :400
- Contact:
Convert Object to byte[] in Java Card
I am using Java Card 2.1.1 and JCDK 2.1.2
How can i convert an Object (an instance of PublicKey) to byte[] and vise versa in Java Card applets?
How can i convert an Object (an instance of PublicKey) to byte[] and vise versa in Java Card applets?
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Convert Object to byte[] in Java Card
aahmadzadeh wrote:I am using Java Card 2.1.1 and JCDK 2.1.2
How can i convert an Object (an instance of PublicKey) to byte[] and vise versa in Java Card applets?
Do you need the function like Serializable interface?
You can use the getXXX() method to convert PublicKey to byte[];
And use the setXXX() method to convert byte[] to PublicKey;
Here's the getXXX/setXXX method PublicKey support:
1 DSAPublicKey: getY/setY;
2 ECPublicKey: getW/setW;
3 RSAPublicKey: getExponent/setExponent and getModulus/setModulus;
sense and simplicity
Who is online
Users browsing this forum: Bing [Bot] and 21 guests