string openssl_encrypt ( string $data , string $method , string $password [, bool $raw_output = false [, string $iv = "" ]] )
Encrypts data
Encrypts given data with given method and key, returns a raw or base64 encoded string
Be advised there was a memory leak in this function: https://bugs.php.net/bug.php?id=54060. I believe this got fixed in 5.3.6, but on production webservers running 5.3.5 with modest traffic, this became a memory hemorrhage that brought my site down. Look at mcrypt_encrypt instead.
5.3.3 The iv parameter was added.
How to encrypt and decrypt files using OpenSSL
0 Comment:
Post a Comment