Class MaskedPassword

  • All Implemented Interfaces:
    MaskedValue, javax.security.auth.Destroyable

    public final class MaskedPassword
    extends java.lang.Object
    implements MaskedValue
    Password which value is masked with ***** in logs.
    • Constructor Detail

      • MaskedPassword

        public MaskedPassword​(byte[] value)
        Constructor.
        Parameters:
        value - value to be masked in logs
    • Method Detail

      • of

        public static MaskedPassword of​(java.lang.String value)
        Instance factory.
        Parameters:
        value - to be masked in logs
        Returns:
        Return new instance
      • getSourceValue

        public java.lang.String getSourceValue()
        Description copied from interface: MaskedValue
        Get source value.
        Specified by:
        getSourceValue in interface MaskedValue
        Returns:
        Returns source value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.security.auth.Destroyable
      • isDestroyed

        public boolean isDestroyed()
        Specified by:
        isDestroyed in interface javax.security.auth.Destroyable