On Wed, Sep 2, 2015 at 3:28 PM, 'Pascal Jasmin' via Programming <programm...@jsoftware.com> wrote: > I don't really know what gets returned yet, but what is worrysome is that > repeated calls return slightly different values.
This crashes J bn2dec a So it's wrong, and if you get a result at all you shouldn't be surprised if it's an inconsistent result. > Some issues I don't know how to deal with in the code below, > > BNnum_bytes is a macro, and error 2 0 occurs if I try to call it. Is there a > workaround? BN_num_bytes is a macro, it's probably something like ([:>.0.125*BN_num_bits) > BN_dec2bn (called above) actually has a pointer to pointer first argument > (**BIGNUM). Is there something special I have to do in the function > signature, or when calling? I'm pretending its just a pointer. Pointer to a pointer means you need to put the pointer somewhere and get the address of that pointer and pass that address as the argument. > BN_bn2dec has a function pointer type as its declaration, and I don't know if > I need to do something special for it. I don't see that in the mentions of BN_bn2dec, here: > the bn2... page > https://www.openssl.org/docs/manmaster/crypto/BN_bn2bin.html Looks to me like it takes an argument which is a pointer to a bignum and returns a result which is a pointer to character (usually, but not always, when working with C, that means it's not a single character but an arbitrary length character sequence which is terminated by 0{a.) Anyways, good start... Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm