The StringEncryptor provides functions to create sting hashes. Hence, this component can be used to prepare passwords for storing. This component can be created by using the following code:

PHP code
$sE = $this->getServiceObject('APF\tools\string\StringEncryptor'); echo $sE->getPasswordHash('=My&Pa$$W0rd=');

To create the hash correctly the class needs the configuration file


to be stored under namespace


with respect to the configuration of the current project. Details on defining configuration paths can be read abound under Configuration.

The file defines the password salt for the creation of the hash value by use of the PHP function crypt(). In common the config file contains the following lines:

APF configuration
[Standard] PasswordSalt = ""
Further information concerning the definition of password salts can be found on


Do you want to add a comment to the article above, or do you want to post additional hints? So please click here. Comments already posted can be found below.
There are no comments belonging to this article.

In order to provide a state-of-the-art web experience and to continuously improve our services we are using cookies. By using this web page you agree to the use of cookies. For more information, please refer to our Privacy policy.