public void initConfiguration() {

        // simple default configuration does not need to be initialized
        if (LOG.isDebugEnabled()) {
            CmsMessageContainer message = Messages.get().container(Messages.LOG_INIT_CONFIG_CALLED_1, this);
            LOG.debug(message.key());
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_INIT_CONFIG_CALLED_1, this));
        }
        m_configuration = CmsParameterConfiguration.unmodifiableVersion(m_configuration);

        // Set default SCrypt parameter values
        m_scryptN = 16384; // CPU cost, must be a power of 2
        m_scryptR = 8; // Memory cost
        m_scryptP = 1; // Parallelization parameter

        String scryptSettings = m_configuration.get(PARAM_SCRYPT_SETTINGS);
        if (scryptSettings != null) {
            String[] settings = CmsStringUtil.splitAsArray(scryptSettings, ',');
            if (settings.length == 3) {
                // we just require 3 correct parameters
                m_scryptN = CmsStringUtil.getIntValue(settings[0], m_scryptN, "scryptN using " + m_scryptN);
                m_scryptR = CmsStringUtil.getIntValue(settings[1], m_scryptR, "scryptR using " + m_scryptR);
                m_scryptP = CmsStringUtil.getIntValue(settings[2], m_scryptP, "scryptP using " + m_scryptP);
            } else {
                if (LOG.isDebugEnabled()) {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_SCRYPT_PARAMETERS_1, scryptSettings));
                }
            }
        }

        // Initialize the SCrypt fall back
        m_scryptFallback = DIGEST_TYPE_MD5;
        String scryptFallback = m_configuration.get(PARAM_SCRYPT_FALLBACK);
        if (scryptFallback != null) {

            try {
                MessageDigest.getInstance(scryptFallback);
                // Configured fall back algorithm available
                m_scryptFallback = scryptFallback;
            } catch (NoSuchAlgorithmException e) {
                // Configured fall back algorithm not available, use default MD5
                if (LOG.isDebugEnabled()) {
                    LOG.debug(Messages.get().getBundle().key(Messages.LOG_SCRYPT_PARAMETERS_1, scryptFallback));
                }
            }
        }
    }
public void initConfiguration ( ) { if ( LOG . isDebugEnabled ( ) ) { CmsMessageContainer message = Messages . get ( ) . container ( Messages . LOG_INIT_CONFIG_CALLED_1 , this ) ; LOG . debug ( message . key ( ) ) ; LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_INIT_CONFIG_CALLED_1 , this ) ) ; } m_configuration = CmsParameterConfiguration . unmodifiableVersion ( m_configuration ) ; m_scryptN = 16384 ; m_scryptR = 8 ; m_scryptP = 1 ; String scryptSettings = m_configuration . get ( PARAM_SCRYPT_SETTINGS ) ; if ( scryptSettings != null ) { String [ ] settings = CmsStringUtil . splitAsArray ( scryptSettings , ',' ) ; if ( settings . length == 3 ) { m_scryptN = CmsStringUtil . getIntValue ( settings [ 0 ] , m_scryptN , "scryptN using " + m_scryptN ) ; m_scryptR = CmsStringUtil . getIntValue ( settings [ 1 ] , m_scryptR , "scryptR using " + m_scryptR ) ; m_scryptP = CmsStringUtil . getIntValue ( settings [ 2 ] , m_scryptP , "scryptP using " + m_scryptP ) ; } else { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_SCRYPT_PARAMETERS_1 , scryptSettings ) ) ; } } } m_scryptFallback = DIGEST_TYPE_MD5 ; String scryptFallback = m_configuration . get ( PARAM_SCRYPT_FALLBACK ) ; if ( scryptFallback != null ) { try { MessageDigest . getInstance ( scryptFallback ) ; m_scryptFallback = scryptFallback ; } catch ( NoSuchAlgorithmException e ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_SCRYPT_PARAMETERS_1 , scryptFallback ) ) ; } } } }
@see org.opencms.configuration.I_CmsConfigurationParameterHandler#initConfiguration()