org.clazzes.util.sec
Class HasherFactory

java.lang.Object
  extended by org.clazzes.util.sec.HasherFactory
All Implemented Interfaces:
PasswordHasherFactory

public class HasherFactory
extends java.lang.Object
implements PasswordHasherFactory

Author:
lech This factory creates password hashers.

Field Summary
 java.util.TreeMap<java.lang.String,PasswordHasher> hashers_byname
           
 
Constructor Summary
HasherFactory()
           
 
Method Summary
 java.util.Collection<PasswordHasher> getKnownPasswordHashers()
           
 PasswordHasher getPasswordHasher(java.lang.String algo_name)
          Returns an instance of a password hasher for the given algorithm name, or null if none could be found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hashers_byname

public java.util.TreeMap<java.lang.String,PasswordHasher> hashers_byname
Constructor Detail

HasherFactory

public HasherFactory()
Method Detail

getPasswordHasher

public PasswordHasher getPasswordHasher(java.lang.String algo_name)
Description copied from interface: PasswordHasherFactory
Returns an instance of a password hasher for the given algorithm name, or null if none could be found.

Specified by:
getPasswordHasher in interface PasswordHasherFactory
Parameters:
algo_name - Name of hasher algorithm a PasswordHasher is wished for.
Returns:
a passwordhasher, if possible, null otherwise.

getKnownPasswordHashers

public java.util.Collection<PasswordHasher> getKnownPasswordHashers()
Specified by:
getKnownPasswordHashers in interface PasswordHasherFactory
Returns:
a Collection of password hashers known to this factory.


Copyright © 2010. All Rights Reserved.