Package javax.security.auth
Interface Destroyable
- All Known Implementing Classes:
KeyStore.PasswordProtection
public interface Destroyable
Allows for special treatment of sensitive information, when it comes to
destroying or clearing of the data.
-
Method Summary
Modifier and Type Method Description voiddestroy()Erases the sensitive information.booleanisDestroyed()Returnstrueonce an object has been safely destroyed.
-
Method Details
-
destroy
Erases the sensitive information. Once an object is destroyed any calls to its methods will throw anIllegalStateException. If it does not succeed a DestroyFailedException is thrown.- Throws:
DestroyFailedException- if the information cannot be erased.
-
isDestroyed
boolean isDestroyed()Returnstrueonce an object has been safely destroyed.- Returns:
- whether the object has been safely destroyed.
-