Is there a difference in benefit for "zeroing out" a char array so it doesn't stay in memory using Arrays.fill(password, 0)
instead of using password = null
? I'm not asking why use a char array instead of a String. I'm asking why set the values to 0 instead of setting the array to null. Is it because setting the values to 0 immediately changes the value in memory, while null doesn't immediately change the value to null in memory, but instead just waits for it to be garbage collected? Would it make sense to set the values to 0 then immediately set it to null as well so that it gets garbage collected, instead of sitting around as an array of 0's?
Wednesday, 2 October 2019
java - Clearing a char array of sensitive data from memory
Subscribe to:
Post Comments (Atom)
php - file_get_contents shows unexpected output while reading a file
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...
-
I have an app which needs a login and a registration with SQLite. I have the database and a user can login and register. But i would like th...
-
I got an error in my Java program. I think this happens because of the constructor is not intialized properly. My Base class Program public ...
-
I would like to use enhanced REP MOVSB (ERMSB) to get a high bandwidth for a custom memcpy . ERMSB was introduced with the Ivy Bridge micro...
No comments:
Post a Comment