com.samskivert.servlet.user
Class Password

java.lang.Object
  extended by com.samskivert.servlet.user.Password

public class Password
extends Object

Represents an encrypted password. Currently only used when creating user accounts.


Field Summary
protected  String _cleartext
           
protected  String _encrypted
           
 
Constructor Summary
protected Password(String cleartext, String encrypted)
          Creates a password instance.
 
Method Summary
 String getCleartext()
          Returns the clear password text.
 String getEncrypted()
          Returns the encrypted password text.
static Password makeFromClear(String password)
          Creates a password instance from the supplied plaintext.
static Password makeFromCrypto(String encrypted)
          Creates a password instance from the supplied already encrypted text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cleartext

protected String _cleartext

_encrypted

protected String _encrypted
Constructor Detail

Password

protected Password(String cleartext,
                   String encrypted)
Creates a password instance.

Method Detail

getCleartext

public String getCleartext()
Returns the clear password text. This method may return null if none was provided when creating the password.


getEncrypted

public String getEncrypted()
Returns the encrypted password text.


makeFromClear

public static Password makeFromClear(String password)
Creates a password instance from the supplied plaintext.


makeFromCrypto

public static Password makeFromCrypto(String encrypted)
Creates a password instance from the supplied already encrypted text. Note: the encrypted text must be obtained from UserUtil.encryptPassword(java.lang.String).



Copyright © 2000-2008 Michael Bayne. All Rights Reserved.