...
To further limit the exposure time of the sensitive password, follow the guideline rule MSC10-J. Limit the lifetime of sensitive data by replacing BufferedReader
with a direct NIO buffer.
...
Other Languages
This guideline rule appears in the C Secure Coding Standard as MSC18-C. Be careful while handling sensitive data, such as passwords, in program code
...