public void registerPasswordHashCreator (@Nonnull final IPasswordHashCreator aPasswordHashCreator)
  {
    ValueEnforcer.notNull (aPasswordHashCreator, "PasswordHashCreator");

    final String sAlgorithmName = aPasswordHashCreator.getAlgorithmName ();
    if (StringHelper.hasNoText (sAlgorithmName))
      throw new IllegalArgumentException ("PasswordHashCreator algorithm '" + aPasswordHashCreator + "' is empty!");

    m_aRWLock.writeLocked ( () -> {
      if (m_aPasswordHashCreators.containsKey (sAlgorithmName))
        throw new IllegalArgumentException ("Another PasswordHashCreator for algorithm '" +
                                            sAlgorithmName +
                                            "' is already registered!");
      m_aPasswordHashCreators.put (sAlgorithmName, aPasswordHashCreator);
    });

    if (LOGGER.isDebugEnabled ())
      LOGGER.debug ("Registered password hash creator algorithm '" + sAlgorithmName + "' to " + aPasswordHashCreator);
  }
public void registerPasswordHashCreator ( @ Nonnull final IPasswordHashCreator aPasswordHashCreator ) { ValueEnforcer . notNull ( aPasswordHashCreator , "PasswordHashCreator" ) ; final String sAlgorithmName = aPasswordHashCreator . getAlgorithmName ( ) ; if ( StringHelper . hasNoText ( sAlgorithmName ) ) throw new IllegalArgumentException ( "PasswordHashCreator algorithm '" + aPasswordHashCreator + "' is empty!" ) ; m_aRWLock . writeLocked ( ( ) -> { if ( m_aPasswordHashCreators . containsKey ( sAlgorithmName ) ) throw new IllegalArgumentException ( "Another PasswordHashCreator for algorithm '" + sAlgorithmName + "' is already registered!" ) ; m_aPasswordHashCreators . put ( sAlgorithmName , aPasswordHashCreator ) ; } ) ; if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Registered password hash creator algorithm '" + sAlgorithmName + "' to " + aPasswordHashCreator ) ; }
Register a new password hash creator. No other password hash creator with
the same algorithm name may be registered.

@param aPasswordHashCreator
The password hash creator to be registered. May not be
<code>null</code>.