R
R
Roman Mirilaczvili2017-08-14 11:07:09
PHP
Roman Mirilaczvili, 2017-08-14 11:07:09

What is the equivalent of mcrypt_decrypt code using openssl_decrypt in PHP?

What is the analogue of this code using openssl_decrypt?

mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $encrypted, MCRYPT_MODE_CBC, $iv)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2017-08-16
@2ord

For a 32 byte key:

openssl_decrypt($encrypted, "aes-256-cbc", $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question