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.

  • 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 - if password is null
  • Method Details

    • password

      public char[] password()
      Returns a caller-owned password copy.
      Returns:
      password copy
      Throws:
      IllegalStateException - if destroyed
    • description

      public String 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:
      description in interface Describable
      Returns:
      non-null descriptive string
    • destroy

      public void destroy()
      Specified by:
      destroy in interface Destroyable
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Destroyable
    • toString

      public String toString()
      Returns a redacted diagnostic representation.
      Overrides:
      toString in class Object
      Returns:
      redacted text