2

I am starting to use PHP's openssl_encrypt method. The second argument is the encryption mode. Where can I find a list of all possible methods / modes?

jww
  • 97,681
  • 90
  • 411
  • 885
Saturn
  • 17,888
  • 49
  • 145
  • 271
  • 1
    http://php.net/manual/en/function.openssl-get-cipher-methods.php if I understood correctly what you're looking for. – Ekin Jul 14 '15 at 02:41

1 Answers1

6

While the manual is scarce, it looks like you can use openssl_get_cipher_methods() to return an array of available cipher methods:

print_r(openssl_get_cipher_methods());

The true argument would return aliases for them, which might be more recognisable, e.g. blowfish, des3 etc. See the manual for an example.

Edit 2019: the manual is no longer scarce.

scrowler
  • 24,273
  • 9
  • 60
  • 92