Re: libmcrypt usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Rixham wrote:
> Gary wrote:
>> Can anyone tell me what the equivalent to the following command line
>> usage of openssl is, in php using the mcrypt_* functions, please:
>> ,----
>> | openssl enc -e -aes-256-cbc -k <some key> ...
>> `----
>>
>> TIA.
>>
>> I tried
>> ,----
>> |         $iv = mcrypt_create_iv(mcrypt_get_block_size(MCRYPT_RIJNDAEL_256,
>> |                                                      MCRYPT_MODE_CBC),
>> |                                MCRYPT_DEV_RANDOM);
>> |         $encryptedData = mcrypt_cbc(MCRYPT_RIJNDAEL_256
>> |                                     ,$passphrase
>> |                                     ,$data
>> |                                     ,MCRYPT_ENCRYPT
>> |                                     ,$iv);
>> `----
>
> use MCRYPT_RIJNDAEL_128

Err.. why, if you don't mind me asking?

-- 
Gary        Please do NOT send me 'courtesy' replies off-list.
PHP 5.2.12 (cli) (built: Jan 14 2010 14:54:11) 
1.7.7(0.230/5/3) 2010-08-31 09:58 Cygwin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux