Home > Resources > Online Tools > PHP Functions > openssl_decrypt()

Live Sandbox PHP openssl_decrypt() Function

PHP openssl_decrypt() Function
Instructions/Notes

openssl_decrypt($your_cipherdata, $encryption_algorithm, $encryption_key, $options, $initialization_vector) — This PHP function decrypts a given cipher (encrypted data) with a given encryption method and key (e.g., password), to return the original plain text data.

  • $initialization_vector (IV) - an arbitary random value used as a seed, along with an encrytion key, to encrypt you message. Without a random seed, a pattern can developed in your cipher data if only your encryption key is used. By mixing in an IV, you mitigate any patterns from forming which could be identified and used to break your encryption key.

Use openssl_encrypt() function first to generate cipher data before using this to decrypt.


Your Cipher Data:   
Encryption Algorithm:   
Encryption Key (i.e., the password):   
Initialization Vector: