Delete storage after each processed command

This commit is contained in:
Manuel Thalmann 2023-11-23 21:03:55 +01:00
parent 9a025cf2dc
commit c71df79b32

View file

@ -157,6 +157,9 @@ public class SecretApplet extends Applet {
} catch (CryptoException exception) { } catch (CryptoException exception) {
ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH | exception.getReason())); ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH | exception.getReason()));
} }
finally {
Util.arrayFill(storage, (short)0, (short)storage.length, (byte)0);
}
ISOException.throwIt(ISO7816.SW_NO_ERROR); ISOException.throwIt(ISO7816.SW_NO_ERROR);
} }