I have to encrypt a file in c with openssl and then i have to decrypt in Java.

In Java i use to decrypt the algorithm

 Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");

With OpenSSL i use

 openssl enc -a -des-ecb -in file -out file.enc -pass pass:abcdefgh

but i have an error message in Java that say

 javax.crypto.BadPaddingException: Given final block not properly padded


What padding does OpenSSL use??? How can i specify the padding??

Thank, Lidia

--
*******************************************************************
LIDIA FERNANDEZ CARPES
Departamento de Ingenieria de la Informacion y las Comunicaciones
Facultad de Informatica
Universidad de Murcia. Campus de Espinardo
30080 Murcia (SPAIN)
Tel.: +34 968 364644
Fax:  +34 968 364151
email: [EMAIL PROTECTED]
*******************************************************************

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to