In the Examples section of the Crypt::CBC documentation it says:
Three examples, aes.pl, des.pl and idea.pl can be found in the eg/ subdirectory of the Crypt-CBC distribution. These implement command-line DES and IDEA encryption algorithms using default parameters, and should be compatible with recent versions of OpenSSL.
This suggests that it is certainly possible. Did you try running those examples? They are probably a good place to start.
| [reply] |
Thank you, hippo. It turned out that I was reading the manual of Crypt::CBC of which the version is newer than the package installed in my Linux. Therefore, some features such as SHA-256 key derivation algorithm and -pbkdf=>'pbkdf2' are not available in my system. After removing related codes in my Perl script, it works finally. My C++ application can now decrypt data that was encrypted by Perl script, and vice versa.
| [reply] [d/l] |
| [reply] [d/l] |
yes. what code did you try? | [reply] |
Sorry I'm not native speaker. I can read but am not good at expressing myself in English. I'm desperate to know how to encrypt data in C codes and then decrypt it in Perl code, and vice versa. I've learnt OpenSSL API before, know how to use EVP and BIO but find it very confusing when working with Perl. I cannot find the tutorial or examples on this topic. How and where did you learn it? Thanks.
| [reply] |
No Perl installer that I know of installs the examples. There are two ways I know of to see them: unpack the source archive yourself, or go to the Crypt-CBC distribution on Meta::CPAN.
Off-topic: I am a native English speaker, and I too have trouble expressing myself in English sometimes.
| [reply] |
Perl is Perl and C is C, no matter what language you speak. Show us your code and we'll show you ours. This is not a code writing service.
| [reply] |