Have you ever had difficulty determining the correct arguments to pass to PHP's openssl_encrypt()
to generate a given cyphertext, or for openssl_decrypt()
to generate a given plaintext? If you know the plaintext to be encrypted, an encryption key, and the desired cyphertext, this website will determine the PHP code to call
openssl_encrypt()
and
openssl_decrypt()
to produce the desired ciphertext (and reverse to the given plaintext) using one or more of these available cipher methods.
For your convenience, fields may be provided in plaintext, hex encoded, or Base64 encoded. This site will determine the variation of each that is required to successfully encrypt/decrypt, including whether it is necessary to pad the plaintext to the cipher block size. If the plaintext includes newlines, it will attempt to determine whether they should be left intact or replaced with \r\n
pairs or just \r
or just \n
(e.g. to make your resulting PHP code run properly whether on Unix or Windows systems).
Want to see it in action? You can populate the form with sample values for AES (ECB), 3DES (ECB), or BLOWFISH (ECB).