brkwsky / contao-encryption
A replacement service for the removed Contao encryption class.
Installs: 327
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.4
- phpseclib/phpseclib: ^2.0.27
Requires (Dev)
- contao/manager-bundle: ^4.4
- contao/test-case: ^4.0.0
- friendsofphp/php-cs-fixer: ^v3.4.0
- phpunit/phpunit: ^8.5.2
- squizlabs/php_codesniffer: ^3.5.4
- symfony/phpunit-bridge: ^4
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
This package is auto-updated.
Last update: 2022-03-02 08:56:55 UTC
README
Abandoned
This package is abandoned. Please use plenta/contao-encryption.
Contao Encryption
A replacement service for the deprecated Contao encryption class (Contao\Encryption).
Install using Contao Manager
Search for encryption and you will find this extension.
Install using Composer
composer require brkwsky/contao-encryption
Example > DCA
// tl_member $GLOBALS['TL_DCA']['tl_member']['fields']['bank_iban'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_member']['bank_iban'], 'exclude' => true, 'inputType' => 'text', 'eval' => [ 'mandatory' => false, 'maxlength' => 32, 'tl_class' => 'w50', 'feEditable' => true, 'feGroup' => 'bank' ], 'load_callback' => [ ['brkwsky.encryption', 'decrypt'] ], 'save_callback' => [ ['brkwsky.encryption', 'encrypt'] ], 'sql' => "varchar(32) NOT NULL default ''" ];
Example > Url parameter
$encryptionService = \Contao\System::getContainer()->get('brkwsky.encryption'); $urlParameter = $encryptionService->encryptUrlSafe('value'); $urlGetParameter = \Contao\Input::get('parameter'); $encryptionService->decryptUrlSafe($urlGetParameter);