Class UnlockMaterial.Password
java.lang.Object
zeroecho.sdk.guard.UnlockMaterial.Password
- All Implemented Interfaces:
Destroyable, Describable, UnlockMaterial
- Enclosing interface:
UnlockMaterial
public static final class UnlockMaterial.Password
extends Object
implements UnlockMaterial, Destroyable
Destroyable password unlocking material backed by an owned character array.
Construction and access use defensive copies. Destruction is idempotent and prevents subsequent access.
-
Nested Class Summary
Nested classes/interfaces inherited from interface UnlockMaterial
UnlockMaterial.Password, UnlockMaterial.Private -
Constructor Summary
ConstructorsConstructorDescriptionPassword(char[] password) Creates password material from a caller-owned array. -
Method Summary
-
Constructor Details
-
Password
public Password(char[] password) Creates password material from a caller-owned array.- Parameters:
password- source characters; retained only as a defensive copy- Throws:
NullPointerException- ifpasswordisnull
-
-
Method Details
-
password
public char[] password()Returns a caller-owned password copy.- Returns:
- password copy
- Throws:
IllegalStateException- if destroyed
-
description
Returns a short, human-readable description of this object.The description should be concise and stable enough for logging or display purposes, while avoiding exposure of any sensitive information.
- Specified by:
descriptionin interfaceDescribable- Returns:
- non-null descriptive string
-
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
toString
-