Title: Message
 
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]);
          }

 
 

Reply via email to