public class RouterPasswordManager
extends net.i2p.util.PasswordManager
| Modifier and Type | Field and Description |
|---|---|
protected RouterContext |
_context |
| Constructor and Description |
|---|
RouterPasswordManager(RouterContext ctx)
// migrate these to b64
private static final String[] MIGRATE_FROM = {
// This has a separate router.reseedProxy.username prop,
// so let's not mess with it
"router.reseedProxy.password",
// Don't migrate these until we have a console form for them,
// which we aren't likely to ever bother with
"routerconsole.keyPassword",
"routerconsole.keystorePassword",
"i2cp.keyPassword",
"i2cp.keystorePassword"
};
private static final String[] MIGRATE_TO = {
"router.reseedProxy.auth",
"routerconsole.ssl.key.auth",
"routerconsole.ssl.keystore.auth",
"i2cp.ssl.key.auth",
"i2cp.ssl.keystore.auth"
};
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
migrate()
Migrate from plaintext to salt/hash
|
boolean |
remove(String realm,
String user)
Remove password, any kind.
|
boolean |
save(String realm,
String user,
String pw)
Same as saveHash()
|
boolean |
saveB64(String realm,
String user,
String pw)
This will fail if
if user contains '#' or '=' or starts with '!'
|
boolean |
saveHash(String realm,
String user,
String pw)
This will fail if
user contains '#' or '=' or starts with '!'
|
boolean |
savePlain(String realm,
String user,
String pw)
This will fail if pw contains a '#'
or if user contains '#' or '=' or starts with '!'
|
protected final RouterContext _context
public RouterPasswordManager(RouterContext ctx)
protected boolean migrate()
public boolean save(String realm, String user, String pw)
realm - e.g. i2cp, routerconsole, etc.user - null or "" for no user, already trimmedpw - plain text, already trimmedpublic boolean savePlain(String realm, String user, String pw)
realm - e.g. i2cp, routerconsole, etc.user - null or "" for no user, already trimmedpw - plain text, already trimmedpublic boolean saveB64(String realm, String user, String pw)
realm - e.g. i2cp, routerconsole, etc.user - null or "" for no user, already trimmedpw - plain text, already trimmedpublic boolean saveHash(String realm, String user, String pw)
realm - e.g. i2cp, routerconsole, etc.user - null or "" for no user, already trimmedpw - plain text, already trimmed