Hello, 

We have used Crypto++ library in one of our C++ projects to encrypt files. We have used following methods defined in test.cpp for encryption and the encrypted string is written to a file.

 

string EncryptString(const char *instr, const char *passPhrase)

{

            string outstr;

 

            DefaultEncryptorWithMAC encryptor(passPhrase, new HexEncoder(new StringSink(outstr)));

            encryptor.Put((byte *)instr, strlen(instr));

            encryptor.MessageEnd();

 

            return outstr;

}

 

My question is,  are there any JAVA libraries that I can use to decrypt the file encrypted using above method? I must admit I have very little knowledge in encryption algorithms. According to comments written in the class declaration of DefaultEncryptorWithMAC and DefaultDecryptorWithMAC  both use password-based Encryptor using DES-EDE2 and HMAC/SHA-1 .

I have found a JAVA library at http://www.bouncycastle.org  which also support DES-EDE and HMAC/SHA-1.  I have also found example test file for DES-EDE and  HMAC/SHA-1, however I  can not see any password being used?  Is this the correct approach? Any advice would be greatly appreciated.

 

Regards,

Tharanaga




Protect your PC - Click here for McAfee.com VirusScan Online

Reply via email to