public class NamedPasswords.NamedPassword extends Password
modified, TAG_PASSWORD, ZERO_CHAR
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description of this password
|
java.lang.String |
getKey()
Get the key (name) of this password
|
char[] |
getPasswordValue()
Return the password characters.
|
boolean |
isPasswordEmpty() |
void |
setDescription(java.lang.String newDesc)
Set the description for this password
|
void |
setPasswordValue(char[] pwdChars)
Set the password characters.
|
org.w3c.dom.Element |
toXML(org.w3c.dom.Node parent)
Construct an XML representation of this instance.
|
clear, clearPassword, finalize, getPassword, getPassword, getTagName, hasBeenModified, isEmpty, isEmpty, isEncrypted, resetModified, setEncrypted, setPassword, setPassword, setPassword, setTagName, setUnencrypted
public char[] getPasswordValue() throws CipherException, java.lang.IllegalStateException
NamedPasswords
instance has a config password set (setConfigPassword()
) then
this will return the clear-text password even if the password value is
encrypted.CipherException
- if an error occurs decrypting passwordjava.lang.IllegalStateException
- if the password is encrypted and no
config password has been set.public boolean isPasswordEmpty() throws CipherException, java.lang.IllegalStateException
CipherException
java.lang.IllegalStateException
public void setPasswordValue(char[] pwdChars) throws CipherException
NamedPasswords
instance has a config password set (setConfigPassword()
) then
this set an encrypted password.pwdChars
- password charactersCipherException
- if an error occurs encrypted the password characterspublic org.w3c.dom.Element toXML(org.w3c.dom.Node parent)
resetModified()
.toXML
in interface ConfigElement
toXML
in class Password
parent
- Node
under which to build representationElement
Password.hasBeenModified()
,
Password.resetModified()
public java.lang.String getKey()
public java.lang.String getDescription()
public void setDescription(java.lang.String newDesc)
newDesc
- description