Content-Disposition: attachment; filename='smime.p7m' />Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name='smime.p7m' Content-Transfer-Encoding: base64 />MIAGCSqGSIb3DQEHA6CAMIACAQAxggG9MIIBuQIBADCBoDCBkjELMAkGA1UEBhMC />QVQxDzANBgNVBAgMBlN0eXJpYTENMAsGA1UEBwwER3JhejEKMAgGA1UECgwBLzEK />MAgGA1UECwwBLzEdMBsGA1UEAwwUQ2hyaXN0b2YgU3Ryb21iZXJnZXIxLDAqBgkq />hkiG9w0BCQEWHXN0cm9. I'm using DESede encryptation in Java and I want to make the same encryptation using the OpenSSL's API in C++. /> Java code: String secretKey = 'abcdefghijklmnopqrstuvwx'; byte[] bytes = secretKey.getBytes('UTF-8'); SecretKey key = new SecretKeySpec(bytes, 'DESede'); Cipher ecipher = Cipher.getInstance('DESede'); ecipher.init(Cipher.ENCRYPT_MODE, key); String input = 'holahola1'; byte[] utf8 = input.getBytes('UTF8'); byte[] enc = ecipher.doFinal(utf8); // Encrypt /> output: [94, -45, 64, -105, 99, -5. I'm encrypting a text (just a string) using OpenSSL's CMS library. I've implemented a cms encrypt method and when I call this in a C++ project (with the equal certificate and input string) it produces the following output: MIME-Version: 1.0 />Content-Disposition: attachment; filename='smime.p7m' />Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name='smime.p7m' Content-Transfer-Encoding: base64 />MIAGCSqGSIb3DQEHA6CAMIACAQAxggG9MIIBuQIBADCBoDCBkjELMAkGA1UEBhMC />QVQxDzANBgNVBAgMBlN0eXJpYTENMAsGA1UEBwwER3JhejEKMAgGA1UECgwBLzEK />MAgGA1UECwwBLzEdMBsGA1UEAwwUQ2hyaXN0b2YgU3Ryb21iZXJnZXIxLDAqBgkq />hkiG9w0BCQEWHXN0cm9.