This code is wrong (I sent a message about that last night). I know how to write a better code (faster/less mallocs) than one you intialy wrote and I hope to do it tonight. The basic idea is to implement following operations: - add int to bignum - mul bignum by int - div bignum by int where bignum is a binary buffer that MSCrypto returns. After that converting that buffer (bignum) to and from dec string is a piece of cake: bignum-->dec string dec_str = ""; while(bignum != 0) { dec _str += convert_to_char(bignum % 10); bignum = bignum / 10; } dec string->bignum bignum = 0; for(i = 0; i < strlen(dec_string);i++) { bignum = bignum * 10; bignum = bignum + convert_to_int(dec_str[i]); } Aleksey |
- [xmlsec] Mscrypto IS patch Wouter
- Re: [xmlsec] Mscrypto IS patch Aleksey Sanin
- Re: [xmlsec] Mscrypto IS patch Aleksey Sanin
- RE: [xmlsec] Mscrypto IS patch Wouter
- RE: [xmlsec] Mscrypto IS patch Aleksey Sanin
- RE: [xmlsec] Mscrypto IS patch Wouter
- Re: [xmlsec] Mscrypto IS patch Aleksey Sanin
- Re: [xmlsec] Mscrypto IS patch Wouter
- Re: [xmlsec] Mscrypto IS patch Aleksey Sanin
- [xmlsec] xmlsec-mscrypto code ... Aleksey Sanin
- RE: [xmlsec] xmlsec-mscrypto c... Wouter
- Re: [xmlsec] xmlsec-mscrypto c... Aleksey Sanin
- Re: [xmlsec] xmlsec-mscrypto c... Aleksey Sanin
- RE: [xmlsec] xmlsec-mscrypto c... Wouter
- Re: [xmlsec] xmlsec-mscrypto c... Aleksey Sanin
