<br><br><div class="gmail_quote">2011/4/10 Daniela Vatamanu <span dir="ltr"><<a href="mailto:daniela.vatamanu@gmail.com">daniela.vatamanu@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Buna,<br>
<br>
Eu am intalnit bad magic number _numai_ atunci cand nu faceam decriptarea bine.<br>
Ultima data inputul incepea de la mem+1 in loc de mem+sizeof(int), de exemplu.<br>
<br>
Dana<br>
<br>
2011/4/10 <<a href="mailto:cristea.adryan@gmail.com">cristea.adryan@gmail.com</a>><br>
<div><div></div><div class="h5">><br>
> Salut,<br>
><br>
> Poate copiezi sirul criptat cu strcpy dintr-un sir in altul.<br>
><br>
> Daca acesta contine '\0' copierea nu se face decat pana la intalnirea caracterului.<br>
><br>
> Poti incerca cu memcpy.<br>
><br>
> Adi<br>
><br>
> La data de , Radu Coman <<a href="mailto:radu.coman.c@gmail.com">radu.coman.c@gmail.com</a>> a scris:<br>
> > Salut,<br>
> ><br>
> > Primesc uneori erori de genul:<br>
> ><br>
> > bad decrypt<br>
> > 2228:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:330:<br>
> > error reading input file<br>
> > bad decrypt<br>
> > 2232:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:330:<br>
> ><br>
> ><br>
> > bad magic number<br>
> > error reading input file<br>
> > error reading input file<br>
> > error reading input file<br>
> > error reading input file<br>
> > error reading input file<br>
> ><br>
> > Stie cineva de la ce ar putea fi?<br>
> ><br>
> > Multumesc,<br>
> > Radu<br>
> ><br>
> ><br>
> ><br>
> ><br>
</div></div>> _______________________________________________<br>
> <a href="http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii" target="_blank">http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii</a><br>
_______________________________________________<br>
<a href="http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii" target="_blank">http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii</a><br></blockquote><div><br><br><br>Nu folosesc strcpy, trimit direct memoria partajata functiei de decriptare.<br>
<br>mem - memoria partajata<br>rez - char[1000]<br> int * size = (int*)mem;<br> dim = decrypt_base64((char*)mem + 4, *size, rez); <br> memcpy((char*)mem + 4, rez, dim);<br><br>Nu imi dau seama care este problema, pe masina virtuala locala am primit o singura data eroarea, iar pe VMChecker primesc mereu la 2-4 teste. In rest totul merge ok.<br>
</div></div><br>