openssl encryption problem

When ecyption with the openssl command line tool I get a different encrypted result than when using c code. Here is the command line batch file: c:\openssl\bin\[url removed, login to view] enc -aes-256-cbc -in [url removed, login to view] -out [url removed, login to view] -iv 8594858548584538 -K 48473823495857573429340324757523 pause Here is the C code: EVP_CIPHER_CTX ctx; iEVP_EncryptInit(&ctx, EVP_aes_256_cbc(), 48473823495857573429340324757523, 8594858548584538); char *settingsDat = "0"; unsigned char * buf = new unsigned char[strlen(settingsDat)+16]; memset(buf, 0, strlen(settingsDat)+16); settingsDat = "0"; int writeCount; EVP_EncryptUpdate(&ctx, buf, &writeCount, (unsigned char*)settingsDat, strlen(settingsDat)); EVP_EncryptFinal(&ctx, buf, &writeCount); ----------------- For the c code, the encrypted result, stored in variable bug, is "L5 ?Ž¢9%v\ä?'?6l" (the text form won't make the encrypted text display properly while I past it, probaly due to the special characters, it is being displayed on two lines, perhaps when you see it is will be displayed on one line) I have included files [url removed, login to view] and encryptedSettings.dat. How can I make the encrypted output the same for both command line and c code?

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform


Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Veja mais: windows batch programming, wensoft, variable programming, programming variable, memset int, line in problem, int v, how can i make web, get a coder problem, c++ programming problem, c programming char, char in c programming, char c programming, cbc programming, openssl, file encryption, aes, aes source code, aes gnu, bug problem, command batch, aes 256 cbc php, openssl server, aes file, php exe desktop

Acerca do Empregador:
( 63 comentários ) Tallahassee, United States

ID do Projeto: #2999813