There are many places where you might want to use and store a password, for example for the SSL connectors, protecting Jetty against accidental or malicious termination, jdbc driver passwords and user passwords in realms.
Passwords can be stored in clear text, obfuscated, checksummed or encrypted in order of increasing security.
The class org.mortbay.util.Password can be used to generate all varieties of passwords.
Run it without arguments to see usage instructions:
For example, to generate a secured version of the password "blah" for the user "me", do:
Now you can cut and paste whichever secure version you choose into your configuration file or java code.
For example, here's how you would cut and paste the encrypted password generated above into the properties file for a Realms: