it.eng.spagobi.security
Class Password

java.lang.Object
  extended by it.eng.spagobi.security.Password

public class Password
extends java.lang.Object

Author:
Franco vuoto (franco.vuoto@eng.it), Alessandro Pegoraro (alessandro.pegoraro@eng.it)

Constructor Summary
Password()
           
Password(java.lang.String value)
           
 
Method Summary
static java.lang.String encriptPassword(java.lang.String password)
          public method used to store passwords on DB.
 java.lang.String getEncValue()
           
 java.lang.String getValue()
           
 boolean hasAltenateCase()
           
 boolean hasDigits()
           
 boolean isEnoughLong()
           
 void setValue(java.lang.String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Password

public Password()

Password

public Password(java.lang.String value)
Method Detail

hasAltenateCase

public boolean hasAltenateCase()

hasDigits

public boolean hasDigits()

isEnoughLong

public boolean isEnoughLong()

getEncValue

public java.lang.String getEncValue()
                             throws java.security.InvalidKeyException,
                                    java.security.NoSuchAlgorithmException
Returns:
Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException

getValue

public java.lang.String getValue()
Returns:

setValue

public void setValue(java.lang.String string)
Parameters:
string -

encriptPassword

public static java.lang.String encriptPassword(java.lang.String password)
                                        throws java.lang.Exception
public method used to store passwords on DB.

Parameters:
clear - password to encrypt
Returns:
encrypted password
Throws:
java.lang.Exception - wrapping InvalidKeyException and NoSuchAlgorithmException