Data Encryption

Categories

Component ID

2911419

Component name

Data Encryption

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

120

Component created

Component changed

Component body

Overview:
This is developer friendly module which will used for Encryption/Decryption data based on the Key & Encryption profile.

Installation:
Download the module and extract it to the modules directory. Install it as any Drupal contributed module.

Configure/Setup all the dependent modules as per there installation instructions.

Usage:
Inject the below service in your module for custom usage:

<?php
use Drupaldata_encryptionServicesDataEncryptionService;

protected $encryption;
/**
* {@inheritdoc}
*/
public function __construct(DataEncryptionService $encryption) {
$this->encryption = $encryption;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('data_encryption.encryption')
);
}

// Encrypted Values
$this->encryption->getEncryptedValue('TEXT TO BE ENCRYPTED', 'ENCRYPTION_PROFILE');

// Decrypted Values
$this->encryption->getDecryptedValue('TEXT TO BE DECRYPTED', 'ENCRYPTION_PROFILE');