Chronoforms v6 can I encrypt a field and have the email send the encrypted field to email

Encrypt a specific form field in ChronoForms for secure email transmission and database storage.

Overview

The issue is needing to encrypt a field, like an email address, using a method like openssl_encrypt before it is sent via email and saved, to prevent the plain text from being exposed during submission.
Use a custom PHP action in your CF form to encrypt the field value on submission. Replace the original field data with the encrypted result before the email is sent and the data is saved to the database.

kr kraken17 12 Feb, 2021
Chronoforms v6 can I encrypt a field and have the email send the encrypted field to email. Essentially I need a form field that a customer can enter an email address in which is then encrypted to md5 standard. This is then sent in an email and saved into the database.

Any help would be appreciated.
Max_admin Max_admin 14 Feb, 2021
Answer
in v7 you can get the whole email body encrypted if you have the encryption module installed on the server!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kr kraken17 21 Feb, 2021
Sorry Max,

I need a specific problem to be solved. I need to encrypt the email address field with opensll_encrpyt so that I can decrypt it at a later date. I am trying to keep the email address field from being revealed when the form is submitted to the server.

I have this php code that works to encrypt the text I pass to it. I can decrypt this later. What I would like to to be able to change the field when the form is submitted and the encrypted info saved.

$iv = '12345678';

$key256 = '1234567890123456ABCDEFGHIJKLMNOP';
$key128 = '1234567890123456';

printf("iv: %s\n",bin2hex($iv));
printf("key256: %s\n",bin2hex($key256));
printf("key128: %s\n",bin2hex($key128));

$cleartext = 'tim@smdcomputers.com';
printf("clearText: %s\n\n",$cleartext);

// Do 256-bit blowfish encryption:
// The strengh of the encryption is determined by the length of the key
// passed to mcrypt_generic_init
$cipherText = openssl_encrypt($cleartext, 'BF-ECB',$key256,OPENSSL_RAW_DATA,$iv );

Can I do this?
kr kraken17 21 Feb, 2021
simplified it a bit.
The third line is ment to changed the "extra_email" field to the encrypted field.
Please say this makes sense.

$iv = '12345678';
$key256 = '1234567890123456ABCDEFGHIJKLMNOP';
$this->data("extra_email",0") = openssl_encrypt($this->data("extra_email",0), 'BF-ECB',$key256,OPENSSL_RAW_DATA,$iv );
This topic is locked and no more replies can be posted.