
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why Char is Preferred Over String for Storing Passwords
Yes, Storing password in String object is not safe for following reasons −
String objects are immutable and until garbage collected, they remain in memory.
String being plain text can be tracked in memory dump of the application.
In log, String based password may be printed which can cause a problem.
Char[] can be cleared or wiped out after the job is done.
Advertisements