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
Question about javacard getInstance() API
-
- Posts: 8
- Joined: Wed Aug 12, 2015 6:27 am
- Points :21
- Contact:
Question about javacard getInstance() API
I know that there are many getInstance methods(e.g. Cipher class, Cipher.getInstance(byte algorithm,boolean externalAccess) throws CryptoException.) in java card API.
My Question:
How many instances will I get if I call Cipher.getInstance(...) twice consecutively?
In RAM, only one instance at all times or each instance per getInstance method invocation?
My Question:
How many instances will I get if I call Cipher.getInstance(...) twice consecutively?
In RAM, only one instance at all times or each instance per getInstance method invocation?
Re: Question about javacard getInstance() API
getInstance() allocates memory from EEPROM not RAM for each call.
The greatest glory in living lies not in never falling, but in rising every time we fall.--Nelson Mandela
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Question about javacard getInstance() API
1 getInstance() create instance for each time this method called. Because instance of Cipher/Signature/RandomData/MessageDigest/KeyAgreement/Checksum has method init/update/doFinal, each instance need to save their own instance data, the instance can not be shared.
2 The RAM space are allocated for each instance.
2 The RAM space are allocated for each instance.
sense and simplicity
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Question about javacard getInstance() API
Tarantino wrote:getInstance() allocates memory from EEPROM not RAM for each call.
There has any variables (internal data) ban be stored in RAM.
sense and simplicity
Who is online
Users browsing this forum: No registered users and 44 guests