I think your question and your problem are two different things, therefore:
What can I do to prevent him from responding to capital letters, to make it not random?
You can use equalsIgnoreCase ( str.equalsIgnoreCase("password") ) to make the comparison case insensitive, but I think your problem is here:
But when I, for example, write "Passwords" (Capital P), the application unexpectedly stops.
This is probably due to a problem in the else block, it looks like either vib or iv are null.
source share