org.eclipse.jetty.util.security
类 Password

java.lang.Object
  继承者 org.eclipse.jetty.util.security.Credential
      继承者 org.eclipse.jetty.util.security.Password
所有已实现的接口:
Serializable

public class Password
extends Credential

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.

另请参见:
序列化表格

嵌套类摘要
 
从类 org.eclipse.jetty.util.security.Credential 继承的嵌套类/接口
Credential.Crypt, Credential.MD5
 
字段摘要
static String __OBFUSCATE
           
 
构造方法摘要
Password(String password)
          Constructor.
 
方法摘要
 boolean check(Object credentials)
          Check a credential
static String deobfuscate(String s)
           
 boolean equals(Object o)
           
static Password getPassword(String realm, String dft, String promptDft)
          Get a password.
 int hashCode()
           
static void main(String[] arg)
           
static String obfuscate(String s)
           
 String toStarString()
           
 String toString()
           
 
从类 org.eclipse.jetty.util.security.Credential 继承的方法
getCredential
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

__OBFUSCATE

public static final String __OBFUSCATE
另请参见:
常量字段值
构造方法详细信息

Password

public Password(String password)
Constructor.

参数:
password - The String password.
方法详细信息

toString

public String toString()
覆盖:
Object 中的 toString

toStarString

public String toStarString()

check

public boolean check(Object credentials)
从类 Credential 复制的描述
Check a credential

指定者:
Credential 中的 check
参数:
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.
返回:
True if the credentials indicated that the shared secret is known to both this Credential and the passed credential.

equals

public boolean equals(Object o)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode

obfuscate

public static String obfuscate(String s)

deobfuscate

public static String deobfuscate(String s)

getPassword

public static Password getPassword(String realm,
                                   String dft,
                                   String promptDft)
Get a password. A password is obtained by trying

参数:
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.
返回:
Password

main

public static void main(String[] arg)
参数:
arg -


Copyright © 2013. All Rights Reserved.