需要使用openssl加密和解密文件的示例C代码

我在Linux C中编写代码。我需要使用openssl加密和解密文件。 目前我正在使用系统命令“des3 -e -nosalt -k 0123456789012345 -in inp_file -out out_file”进行加密,使用“des3 -d -nosalt -k 0123456789012345 -in inp_file -out out_file”进行解密。 我应该在哪里获得示例代码以使用C API执行相同的操作。

我会看一下: http : //www.openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES

在这里: http : //www.nlnetlabs.nl/downloads/publications/hsm/hsm_node17.html