openssl des-ede3-cbc does not match with Java one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> echo 'text_to_cypher' | openssl enc -e -des-ede3-cbc -k 'b2aec78eb50e04f2a60b9efa20b82c903e3cad4f3bd2027g' -iv 00000000 -nosalt | openssl enc -base64

That echo command will append a LF (x'0a') byte (if this is a conventional UNIX or Linux system, or Cygwin, etc, and you're running under one of the standard shells). Do you have that byte in the value of your "cleartext" variable in the Java code? You failed to supply that. (Also, the single-quote characters are unnecessary, unless you're running a very odd shell.)

The value of the -k argument you're passing to "openssl enc" ends with "g", which is not a hexadecimal digit; the rest of the value appears to be hexadecimal. But it's not clear why you're using -k anyway. Perhaps you mean to use -K (uppercase K, with an actual hexadecimal argument)?


-- 
Michael Wojcik
Technology Specialist, Micro Focus



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux