Package net.i2p.router.web
Class ConsolePasswordManager
- java.lang.Object
- 
- net.i2p.util.PasswordManager
- 
- net.i2p.router.util.RouterPasswordManager
- 
- net.i2p.router.web.ConsolePasswordManager
 
 
 
- 
 public class ConsolePasswordManager extends RouterPasswordManager Manage both plaintext and salted/hashed password storage in router.config.- Since:
- 0.9.4
 
- 
- 
Field Summary- 
Fields inherited from class net.i2p.router.util.RouterPasswordManager_context
 - 
Fields inherited from class net.i2p.util.PasswordManagerPROP_B64, PROP_CRYPT, PROP_MD5, PROP_PW, PROP_SHASH, SALT_LENGTH, SHASH_LENGTH
 
- 
 - 
Constructor SummaryConstructors Constructor Description ConsolePasswordManager(RouterContext ctx)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckMD5(String realm, String subrealm, String user, String pw)Straight MD5.Map<String,String>getMD5(String realm)Get all MD5 usernames and passwords.booleansaveMD5(String realm, String subrealm, String user, String pw)Straight MD5, no salt Compatible with Jetty and RFC 2617.- 
Methods inherited from class net.i2p.router.util.RouterPasswordManagermigrate, remove, save, saveB64, saveHash, savePlain
 - 
Methods inherited from class net.i2p.util.PasswordManagercheck, checkB64, checkHash, checkHash, checkPlain, createHash, get, getB64, getPlain, md5Hex, md5Hex, md5Sum
 
- 
 
- 
- 
- 
Constructor Detail- 
ConsolePasswordManagerpublic ConsolePasswordManager(RouterContext ctx) 
 
- 
 - 
Method Detail- 
checkMD5public boolean checkMD5(String realm, String subrealm, String user, String pw) Straight MD5. Compatible with Jetty.- Parameters:
- realm- e.g. i2cp, routerconsole, etc.
- user- null or "" for no user, already trimmed
- pw- plain text, already trimmed
- Returns:
- if pw verified
 
 - 
getMD5public Map<String,String> getMD5(String realm) Get all MD5 usernames and passwords. Compatible with Jetty. Any "null" user is NOT included..- Parameters:
- realm- e.g. i2cp, routerconsole, etc.
- Returns:
- Map of usernames to passwords (hex with leading zeros, 32 characters)
 
 - 
saveMD5public boolean saveMD5(String realm, String subrealm, String user, String pw) Straight MD5, no salt Compatible with Jetty and RFC 2617.- Parameters:
- realm- The full realm, e.g. routerconsole.auth.i2prouter, etc.
- subrealm- to be used in creating the checksum
- user- non-null, non-empty, already trimmed
- pw- plain text
- Returns:
- if pw verified
 
 
- 
 
-