We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mp_int_to_unsigned does not return the number of bytes actually written to the buffer.
mp_int_to_unsigned
mp_int_to_unsigned calls s_tobin, which does return the number of bytes actually written to the buffer, so the information is available.
s_tobin
One solution is to change mp_int_to_unsigned to
mp_result mp_int_to_unsigned(mp_int z, unsigned char *buf, int *limit)
but it is a breaking change.
The text was updated successfully, but these errors were encountered:
One may call mp_int_unsigned_len(&z) to get the length of the buffer consumed, e.g.,
mp_int_unsigned_len(&z)
mp_result len = mp_int_unsigned_len(&z); unsigned char *buf = malloc(len); mp_int_to_unsigned(&z, buf, len);
I realize that's an extra call, but it's not a very expensive one, so I'd rather not change the API for this.
Sorry, something went wrong.
I misread the docs. Sorry for the noise.
No branches or pull requests
mp_int_to_unsigned
does not return the number of bytes actually written to the buffer.mp_int_to_unsigned
callss_tobin
, which does return the number of bytes actually written to the buffer, so the information is available.One solution is to change
mp_int_to_unsigned
tobut it is a breaking change.
The text was updated successfully, but these errors were encountered: