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

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 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.
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?
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 );
You need to login to be able to post a reply.