Author Topic: encrypt and decrypt messages in Roundcube  (Read 4738 times)

Offline tobiaszliszka

  • Newbie
  • *
  • Posts: 6
encrypt and decrypt messages in Roundcube
« on: January 18, 2011, 03:28:26 PM »
Does some plugin exist, or there is the possibility of the implementation of some easy sctipt encrypting and decrypting messages: mcrypt, pgp or any different ??

Something in like this:

<?php
$data 
"mesage";
$key "password";
$td MCRYPT_RIJNDAEL_256

$iv_size mcrypt_get_iv_size($tdMCRYPT_MODE_ECB); 
$iv mcrypt_create_iv($iv_sizeMCRYPT_RAND); 

echo 
"Original data: $data 
"
;

$encrypted_data mcrypt_encrypt($td$key$dataMCRYPT_MODE_CBC$iv); 

echo 
"Encrypted data: " bin2hex($encrypted_data)  . "
"



$data mcrypt_decrypt($td$key$encrypted_dataMCRYPT_MODE_CBC$iv); // decrypts data
echo trim($data);
?>


How i can use this script, or any different??
« Last Edit: January 18, 2011, 03:31:44 PM by tobiaszliszka »