chararray. There is a good reason for this: depending on implementation specifics,
Stringinstances might be stored in a permanent memory area.
chararrays. If you are working with passwords that are already arriving to you in a
Stringinstance, just call
.toCharArray()on it to perform the conversion where necessary.
hashbyte arrays are identical. You can easily see however how this is not always a very practical representation format. You cannot directly use this value in a text file, an email message or a JSON payload.
BruceException. As it is a
RuntimeException, you are not forced to catch it.