获取 PHP openssl_encrypt 方法/模式的列表

Get list of PHP openssl_encrypt methods / modes

我开始使用PHP的openssl_encrypt方法。第二个参数是加密模式。我在哪里可以找到所有可能的方法/模式的列表?

虽然 the manual is scarce, it looks like you can use openssl_get_cipher_methods() 到 return 一组可用的密码方法:

print_r(openssl_get_cipher_methods());

true 参数会 return 它们的别名,这可能更容易识别,例如blowfishdes3 等。请参阅手册以获取示例。

编辑2019:手册不再稀缺