在 macOS 上调用 EVP_get_cipherbyname
时遇到了问题:
const char *cipher_str = "aes-256-cbc";
const evp_cipher_st *cipher1 = EVP_aes_256_cbc();
const evp_cipher_st *cipher2 = EVP_get_cipherbyname(cipher_str);
在上述代码中,
cipher1
将始终被设置为有效的 evp_cipher_st *
对象,而 cipher2
将始终为 null。我没有找到一个单独的 cipher_str
实例会生成非空的 cipher2
。我是否做错了什么?是否还有其他调用应该进行来使其正常工作?