Class Password

java.lang.Object
com.aoapps.security.Password
All Implemented Interfaces:
AutoCloseable, Cloneable, Destroyable
Direct Known Subclasses:
UnprotectedPassword

public class Password extends Object implements Destroyable, AutoCloseable, Cloneable
Represents plaintext password characters, with support for wiping the contents. This is used in preference to char[] as a matter of both convenience and protection.

This does not provide any access to the given password. It is a password black hole: gone forever from outside observers.

Instances of this class are thread-safe.

This class intentionally does not implement equals(java.lang.Object) and hashCode(), as it is not intended to be used in data structures or any complex manipulation. It is solely meant to safely carry a password.

This class also does not implement Serializable or Externalizable. Applications that need to send passwords across the wire must use another mechanism. Applications that need to store passwords should be using HashedPassword.

Author:
AO Industries, Inc.