Class Password

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated(since="2021-05-27")
    public class Password
    extends Credential
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Password utility class. This utility class gets a password or pass phrase either by:
      + Password is set as a system property.
      + The password is prompted for and read from standard input
      + A program is run to get the password.
      
    Passwords that begin with OBF: are de obfuscated. Passwords can be obfuscated by run org.eclipse.util.Password as a main class. Obfuscated password are required if a system needs to recover the full password (eg. so that it may be passed to another system). They are not secure, but prevent casual observation.

    Passwords that begin with CRYPT: are oneway encrypted with UnixCrypt. The real password cannot be retrieved, but comparisons can be made to other passwords. A Crypt can be generated by running org.eclipse.util.UnixCrypt as a main class, passing password and then the username. Checksum passwords are a secure(ish) way to store passwords that only need to be checked rather than recovered. Note that it is not strong security - specially if simple passwords are used.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String __OBFUSCATE
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      Password​(java.lang.String password)
      Deprecated.
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean check​(java.lang.Object credentials)
      Deprecated.
      Check a credential
      static java.lang.String deobfuscate​(java.lang.String s)
      Deprecated.
       
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      static Password getPassword​(java.lang.String realm, java.lang.String dft, java.lang.String promptDft)
      Deprecated.
      Get a password.
      int hashCode()
      Deprecated.
       
      static void main​(java.lang.String[] arg)
      Deprecated.
       
      static java.lang.String obfuscate​(java.lang.String s)
      Deprecated.
       
      java.lang.String toStarString()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • __OBFUSCATE

        public static final java.lang.String __OBFUSCATE
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Password

        public Password​(java.lang.String password)
        Deprecated.
        Constructor.
        Parameters:
        password - The String password.
    • Method Detail

      • toString

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

        public java.lang.String toStarString()
        Deprecated.
      • check

        public boolean check​(java.lang.Object credentials)
        Deprecated.
        Description copied from class: Credential
        Check a credential
        Specified by:
        check in class Credential
        Parameters:
        credentials - The credential to check against. This may either be another Credential object, a Password object or a String which is interpreted by this credential.
        Returns:
        True if the credentials indicated that the shared secret is known to both this Credential and the passed credential.
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • obfuscate

        public static java.lang.String obfuscate​(java.lang.String s)
        Deprecated.
      • deobfuscate

        public static java.lang.String deobfuscate​(java.lang.String s)
        Deprecated.
      • getPassword

        public static Password getPassword​(java.lang.String realm,
                                           java.lang.String dft,
                                           java.lang.String promptDft)
        Deprecated.
        Get a password. A password is obtained by trying
        • Calling System.getProperty(realm,dft)
        • Prompting for a password
        • Using promptDft if nothing was entered.
        Parameters:
        realm - The realm name for the password, used as a SystemProperty name.
        dft - The default password.
        promptDft - The default to use if prompting for the password.
        Returns:
        Password
      • main

        public static void main​(java.lang.String[] arg)
        Deprecated.