org.opensubsystems.core.util
Class PasswordUtils

java.lang.Object
  extended by org.opensubsystems.core.util.PasswordUtils

public final class PasswordUtils
extends java.lang.Object

Class responsible for encrypting of data.

Version:
$Id: PasswordUtils.java,v 1.7 2007/01/07 06:14:01 bastafidli Exp $
Author:
Julo Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.4 2005/07/29 07:36:24 bastafidli

Field Summary
static java.lang.String PASSWORD_ALGORITHM_PROVIDER
          Configuration setting allowing to specify algorithm implementation provider to use for an algorithm defined by property oss.messagedigest.algorithm.
static java.lang.String PASSWORD_ALGORITHM_PROVIDER_DEFAULT
          Default provider algorithm of which to use.
static java.lang.String PASSWORD_DIGEST_ALGORITHM
          Configuration setting allowing to specify algorithm to generate message digests for verifying passwords.
static java.lang.String PASSWORD_DIGEST_ALGORITHM_DEFAULT
          Default algorithm to use to encrpt passwords.
protected static java.lang.String s_strPasswordAlgorithm
          Algorithm used to encrypt password.
protected static java.lang.String s_strPasswordAlgorithmProvider
          Provider lgorithm of which to use.
 
Method Summary
static java.lang.String getMessageDigest(java.lang.String strData)
          Generate message digest from specified data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASSWORD_DIGEST_ALGORITHM

public static final java.lang.String PASSWORD_DIGEST_ALGORITHM
Configuration setting allowing to specify algorithm to generate message digests for verifying passwords. The standard names of the algorithms are defined by Java Cryptography Architecture API Specification Reference http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#AppA

See Also:
Constant Field Values

PASSWORD_ALGORITHM_PROVIDER

public static final java.lang.String PASSWORD_ALGORITHM_PROVIDER
Configuration setting allowing to specify algorithm implementation provider to use for an algorithm defined by property oss.messagedigest.algorithm.

See Also:
Constant Field Values

PASSWORD_DIGEST_ALGORITHM_DEFAULT

public static final java.lang.String PASSWORD_DIGEST_ALGORITHM_DEFAULT
Default algorithm to use to encrpt passwords. Get a message digest object using the SHA1 algorithm (since MD5 showed recently vulnerability).

See Also:
Constant Field Values

PASSWORD_ALGORITHM_PROVIDER_DEFAULT

public static final java.lang.String PASSWORD_ALGORITHM_PROVIDER_DEFAULT
Default provider algorithm of which to use. By default we use Bouncy Castle algoritm implementations.

See Also:
Constant Field Values

s_strPasswordAlgorithm

protected static java.lang.String s_strPasswordAlgorithm
Algorithm used to encrypt password. The standard names of the algorithms are defined by Java Cryptography Architecture API Specification Reference http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#AppA


s_strPasswordAlgorithmProvider

protected static java.lang.String s_strPasswordAlgorithmProvider
Provider lgorithm of which to use.

Method Detail

getMessageDigest

public static java.lang.String getMessageDigest(java.lang.String strData)
                                         throws OSSException
Generate message digest from specified data.

Parameters:
strData - - data to generate digest from
Returns:
String - generate message digest
Throws:
OSSException - - an error has occured


Copyright © 2003 - 2006 OpenSubsystems s.r.o.