|
Préférences
Moteurs de recherche
|
||||||||||||||
JavaTM 2 Platform Std. Ed. v1.5.0
java.security
|
Constructor Summary | |
---|---|
KeyStore.PasswordProtection(char[] password)
Creates a password parameter. |
Method Summary | |
---|---|
void |
destroy()
Clears the password. |
char[] |
getPassword()
Gets the password. |
boolean |
isDestroyed()
Determines if password has been cleared. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyStore.PasswordProtection(char[] password)
The specified password
is cloned before it is stored
in the new PasswordProtection
object.
password
- the password, which may be null
Method Detail |
---|
public char[] getPassword()
Note that this method returns a reference to the password. If a clone of the array is created it is the caller's responsibility to zero out the password information after it is no longer needed.
null
IllegalStateException
- if the password has
been cleared (destroyed)destroy()
public void destroy() throws DestroyFailedException
destroy
in interface Destroyable
DestroyFailedException
- if this method was unable
to clear the passwordpublic boolean isDestroyed()
isDestroyed
in interface Destroyable