开发者

How to decrypt the text

开发者 https://www.devze.com 2023-04-08 20:03 出处:网络
Thanks for previous replies I am doing encryption and decryption for my log in authentication. i used

Thanks for previous replies

I am doing encryption and decryption for my log in authentication. i used

define('VECTOR', 'EXfPCW23'); //example, not the actual used VECTOR / KEY
$key = 'lolwatlolwat';
$filter = new Zend_Filter_Encrypt();
$filter->setEncryption(array('key' => $key));
$filter->setVector(VECTOR);
return $filter->开发者_JAVA技巧filter($password);

this codings to encrypt the data. whenever i tried to decrypt the data, the values never be decrypted. in the above coding i changed $filter=new Zend_Filter_Decrypt(); for the decryption. pls guide me to decrypt the encrypted value. i am new to this topic.


You can try this

$filter = new Zend_Filter_Decrypt('myencryptionkey');

// Set the vector with which the content was encrypted
$filter->setVector('myvector');

$decrypted = $filter->filter($encrypted);
print $decrypted;

Please refer

http://www.thomasweidner.com/flatpress/2009/01/14/how-to-encrypt-with-zf/

0

精彩评论

暂无评论...
验证码 换一张
取 消