Blowfish decryption in C

In C (linux), I am pulling a Blowfish encoded string from the database. I know the "passphrase" and obviously I have the encoded string. Can I use the crypto libraries to decode this string?

I've tried decrypting from the command line using openssl but I have been unsuccessful. Strangely enough, I found an online tool which uses the the crypt_blowfish class of the PEAR project and this does decode my string successfully. That tool is:

A little guidance would be greatly appreciated.
Who is Participating?
Sure you can use libssl for decryption. Have you seen the examples? Have you written some code to try out?
merimaxAuthor Commented:
Well, at this point I can't even get the openssl command line routines to decrypt the string. Since I can get the tool to decrypt the string then I realize I am missing something pretty obvious.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

merimaxAuthor Commented:
Ok. I am able to get this to work the way I want in PHP. Could someone offer some suggestions on how to convert this to C using the openssl blowfish libraries. I have tried several different combinations of openssl blowfish routines and I keep going around in circles. Anyway this is how I got it to work in PHP....

$p="password.sample" ;
$i="MCtwzLQuwdQdhwhciKlhORtKO5K8g8HhA7JGMfpxs41Wtct7lVwHKw==" ;
$blowfish = new Crypt_Blowfish($p);
$output = $blowfish->decrypt(base64_decode($i));
here is list of blowfish libraries are available,you can download one and compile and run
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.